stable_fs::storage::transient

Struct TransientStorage

source
pub struct TransientStorage { /* private fields */ }

Implementations§

source§

impl TransientStorage

source

pub fn new() -> Self

Trait Implementations§

source§

impl Default for TransientStorage

source§

fn default() -> TransientStorage

Returns the “default value” for a type. Read more
source§

impl Storage for TransientStorage

source§

fn root_node(&self) -> Node

source§

fn get_version(&self) -> u32

source§

fn new_node(&mut self) -> Node

source§

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

source§

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

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( &mut self, node: Node, offset: FileSize, buf: &mut [u8], ) -> Result<FileSize, Error>

source§

fn rm_file(&mut self, node: Node) -> Result<(), Error>

source§

fn mount_node( &mut self, node: Node, memory: Box<dyn Memory>, ) -> Result<(), Error>

source§

fn unmount_node(&mut self, node: Node) -> Result<Box<dyn Memory>, Error>

source§

fn is_mounted(&self, node: Node) -> bool

source§

fn get_mounted_memory(&self, node: Node) -> Option<&dyn Memory>

source§

fn init_mounted_memory(&mut self, node: Node) -> Result<(), Error>

source§

fn store_mounted_memory(&mut self, node: Node) -> Result<(), Error>

source§

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

source§

fn set_chunk_size(&mut self, _chunk_size: ChunkSize) -> Result<(), Error>

source§

fn chunk_size(&self) -> usize

source§

fn set_chunk_type(&mut self, _chunk_type: ChunkType)

source§

fn chunk_type(&self) -> ChunkType

source§

fn flush(&mut self, _node: Node)

Auto Trait Implementations§

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

source§

type Output = T

Should always be Self
source§

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

source§

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>,

source§

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.