struct TmpNode {
name: String,
file_type: FileType,
content: Vec<u8>,
metadata: FileMetadata,
children: DirectoryEntries,
}
Expand description
Node in the tmpfs filesystem
Fields§
§name: String
File name
file_type: FileType
File type and associated data
content: Vec<u8>
File content (only for regular files)
metadata: FileMetadata
File metadata
children: DirectoryEntries
For directories: child nodes
Implementations§
Source§impl TmpNode
impl TmpNode
Sourcefn new_directory(name: String) -> Self
fn new_directory(name: String) -> Self
Create a new directory node
Sourcefn new_device(name: String, file_type: FileType) -> Self
fn new_device(name: String, file_type: FileType) -> Self
Create a new device file node
Sourcefn update_size(&mut self, new_size: usize)
fn update_size(&mut self, new_size: usize)
Update file size and modification time
Sourcefn update_access_time(&mut self)
fn update_access_time(&mut self)
Update access time
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TmpNode
impl RefUnwindSafe for TmpNode
impl Send for TmpNode
impl Sync for TmpNode
impl Unpin for TmpNode
impl UnwindSafe for TmpNode
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)