mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
wip storage integration
This commit is contained in:
@@ -136,8 +136,6 @@ impl StorageEntity for DemoVal {
|
||||
}
|
||||
|
||||
fn from_storage_entry<E, Tx: StorageOps<E>>(tx: &mut Tx, entry: StorageEntry) -> Result<Self, E> {
|
||||
let mut reader = StorageEntryReader::new(&entry);
|
||||
|
||||
Self::read_from_entry(tx, &mut reader)
|
||||
Self::read_from_entry(tx, &mut StorageEntryReader::new(&entry))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,5 +17,7 @@ pub use self::storage::Storage;
|
||||
pub use self::storage_backend::StorageBackend;
|
||||
pub use memory_backend::MemoryBackend;
|
||||
pub use sled_backend::SledBackend;
|
||||
pub use storage_entity::StorageEntity;
|
||||
pub use storage_entry::{StorageEntry, StorageEntryReader};
|
||||
pub use storage_ptr::{storage_head_ptr, StoragePtr};
|
||||
pub use storage_ops::StorageOps;
|
||||
pub use storage_ptr::{storage_head_ptr, StorageEntryPtr, StorageHeadPtr, StoragePtr};
|
||||
|
||||
@@ -5,8 +5,8 @@ use crate::storage_ptr::StorageEntryPtr;
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct StorageEntry {
|
||||
pub(crate) ref_count: u64,
|
||||
pub(crate) refs: Vec<StorageEntryPtr>,
|
||||
pub(crate) data: Vec<u8>,
|
||||
pub refs: Vec<StorageEntryPtr>,
|
||||
pub data: Vec<u8>,
|
||||
}
|
||||
|
||||
pub struct StorageEntryReader<'a> {
|
||||
|
||||
Reference in New Issue
Block a user