#[repr(C)]
pub struct StableStorage<M: Memory> { /* private fields */ }

Implementations§

source§

impl<M: Memory> StableStorage<M>

source

pub fn new(memory: M) -> Self

source

pub fn new_with_memory_indices( memory: M, metadata_id: MemoryId, direntry_id: MemoryId, filechunk_id: MemoryId ) -> Self

Trait Implementations§

source§

impl<M: Memory> Storage for StableStorage<M>

source§

fn root_node(&self) -> Node

source§

fn new_node(&mut self) -> Node

source§

fn get_version(&self) -> u32

source§

fn get_metadata(&self, node: Node) -> Result<Metadata, Error>

source§

fn put_metadata(&mut self, node: Node, metadata: Metadata)

source§

fn rm_metadata(&mut self, node: Node)

source§

fn get_direntry( &self, node: Node, index: DirEntryIndex ) -> Result<DirEntry, Error>

source§

fn put_direntry(&mut self, node: Node, index: DirEntryIndex, entry: DirEntry)

source§

fn rm_direntry(&mut self, node: Node, index: DirEntryIndex)

source§

fn read_filechunk( &self, node: Node, index: FileChunkIndex, offset: FileSize, buf: &mut [u8] ) -> Result<(), Error>

source§

fn write_filechunk( &mut self, node: Node, index: FileChunkIndex, offset: FileSize, buf: &[u8] )

source§

fn rm_filechunk(&mut self, node: Node, index: FileChunkIndex)

Auto Trait Implementations§

§

impl<M> Freeze for StableStorage<M>

§

impl<M> !RefUnwindSafe for StableStorage<M>

§

impl<M> !Send for StableStorage<M>

§

impl<M> !Sync for StableStorage<M>

§

impl<M> Unpin for StableStorage<M>

§

impl<M> !UnwindSafe for StableStorage<M>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.