pub enum MemoryNode {
File(MemoryFile),
Dir(MemoryDir),
}
Expand description
An in-memory representation of a filesystem node.
Variants§
Implementations§
Source§impl MemoryNode
impl MemoryNode
Sourcepub fn as_file(&self) -> Option<&MemoryFile>
pub fn as_file(&self) -> Option<&MemoryFile>
Try to return a MemoryFile
out of [self
].
Trait Implementations§
Source§impl Clone for MemoryNode
impl Clone for MemoryNode
Source§fn clone(&self) -> MemoryNode
fn clone(&self) -> MemoryNode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MemoryNode
impl Debug for MemoryNode
Source§impl<'de> Deserialize<'de> for MemoryNode
impl<'de> Deserialize<'de> for MemoryNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MemoryNode
impl RefUnwindSafe for MemoryNode
impl Send for MemoryNode
impl Sync for MemoryNode
impl Unpin for MemoryNode
impl UnwindSafe for MemoryNode
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