pub struct DummyStorage {}
Implementations§
Source§impl DummyStorage
impl DummyStorage
Trait Implementations§
Source§impl Default for DummyStorage
impl Default for DummyStorage
Source§impl Storage for DummyStorage
impl Storage for DummyStorage
Source§fn get_version(&self) -> u32
fn get_version(&self) -> u32
Get version of the file system.
Source§fn get_metadata(&self, _node: Node) -> Result<Metadata, Error>
fn get_metadata(&self, _node: Node) -> Result<Metadata, Error>
Get the metadata associated with the node.
Source§fn put_metadata(
&mut self,
_node: Node,
_metadata: &Metadata,
) -> Result<(), Error>
fn put_metadata( &mut self, _node: Node, _metadata: &Metadata, ) -> Result<(), Error>
Update the metadata associated with the node.
Source§fn get_direntry(
&self,
_node: Node,
_index: DirEntryIndex,
) -> Result<DirEntry, Error>
fn get_direntry( &self, _node: Node, _index: DirEntryIndex, ) -> Result<DirEntry, Error>
Retrieve the DirEntry instance given the Node and DirEntryIndex.
fn put_direntry(&mut self, _node: Node, _index: DirEntryIndex, _entry: DirEntry)
fn rm_direntry(&mut self, _node: Node, _index: DirEntryIndex)
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>,
_policy: MountedFileSizePolicy,
) -> Result<(), Error>
fn mount_node( &mut self, _node: Node, _memory: Box<dyn Memory>, _policy: MountedFileSizePolicy, ) -> Result<(), Error>
mark node as mounted.
Source§fn unmount_node(&mut self, _node: Node) -> Result<Box<dyn Memory>, Error>
fn unmount_node(&mut self, _node: Node) -> Result<Box<dyn Memory>, Error>
mark note as not mounted.
Source§fn is_mounted(&self, _node: Node) -> bool
fn is_mounted(&self, _node: Node) -> bool
return true if the node is mounted.
Source§fn get_mounted_memory(&self, _node: Node) -> Option<&dyn Memory>
fn get_mounted_memory(&self, _node: Node) -> Option<&dyn Memory>
return mounted memory related to the node, or None.
Source§fn init_mounted_memory(&mut self, _node: Node) -> Result<(), Error>
fn init_mounted_memory(&mut self, _node: Node) -> Result<(), Error>
initialize memory with the contents from file.
Source§fn store_mounted_memory(&mut self, _node: Node) -> Result<(), Error>
fn store_mounted_memory(&mut self, _node: Node) -> Result<(), Error>
store mounted memory state back to host file.
fn write( &mut self, _node: Node, _offset: FileSize, _buf: &[u8], ) -> Result<FileSize, Error>
fn rm_file(&mut self, _node: Node) -> Result<(), Error>
fn set_chunk_size(&mut self, _chunk_size: ChunkSize) -> Result<(), Error>
fn chunk_size(&self) -> usize
fn set_chunk_type(&mut self, _chunk_type: ChunkType)
fn chunk_type(&self) -> ChunkType
fn flush(&mut self, _node: Node)
fn resize_file(&mut self, _node: Node, _new_size: FileSize) -> Result<(), Error>
Source§fn with_direntries(
&self,
_node: Node,
_initial_index: Option<DirEntryIndex>,
_f: &mut dyn FnMut(&DirEntryIndex, &DirEntry) -> bool,
)
fn with_direntries( &self, _node: Node, _initial_index: Option<DirEntryIndex>, _f: &mut dyn FnMut(&DirEntryIndex, &DirEntry) -> bool, )
get entries iterator
Source§fn new_direntry_index(&self, _node: Node) -> DirEntryIndex
fn new_direntry_index(&self, _node: Node) -> DirEntryIndex
Return the DirEntryIndex that can be used for a new entry
Source§fn get_direntry_index_by_name(
&self,
_en: &(Node, FileName),
) -> Option<DirEntryIndex>
fn get_direntry_index_by_name( &self, _en: &(Node, FileName), ) -> Option<DirEntryIndex>
Retrieve the DirEntryIndex instance given the Node and DirEntryIndex.
Auto Trait Implementations§
impl Freeze for DummyStorage
impl RefUnwindSafe for DummyStorage
impl Send for DummyStorage
impl Sync for DummyStorage
impl Unpin for DummyStorage
impl UnwindSafe for DummyStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more