pub struct TransientStorage { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl Default for TransientStorage
impl Default for TransientStorage
Source§fn default() -> TransientStorage
fn default() -> TransientStorage
Returns the “default value” for a type. Read more
Source§impl Storage for TransientStorage
impl Storage for TransientStorage
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.
Source§fn get_direntry_index_by_name(
&self,
entry: &(Node, FileName),
) -> Option<DirEntryIndex>
fn get_direntry_index_by_name( &self, entry: &(Node, FileName), ) -> Option<DirEntryIndex>
Retrieve the DirEntryIndex 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>
fn resize_file(&mut self, node: Node, new_size: FileSize) -> Result<(), Error>
fn rm_file(&mut self, node: Node) -> Result<(), 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 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)
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 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
Auto Trait Implementations§
impl Freeze for TransientStorage
impl !RefUnwindSafe for TransientStorage
impl !Send for TransientStorage
impl !Sync for TransientStorage
impl Unpin for TransientStorage
impl !UnwindSafe for TransientStorage
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