stable_fs::storage::dummy

Struct DummyStorage

source
pub struct DummyStorage {}

Implementations§

source§

impl DummyStorage

source

pub fn new() -> Self

Trait Implementations§

source§

impl Default for DummyStorage

source§

fn default() -> Self

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

impl Storage for DummyStorage

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 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 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 rm_file(&mut self, _node: Node) -> Result<(), 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.