Enum diskplan_schema::SchemaType 
source · pub enum SchemaType<'t> {
    Directory(DirectorySchema<'t>),
    File(FileSchema<'t>),
}Expand description
File/directory specific aspects of a node in the tree
Variants§
Directory(DirectorySchema<'t>)
Indicates that this node describes a directory
File(FileSchema<'t>)
Indicates that this node describes a file
Implementations§
source§impl<'t> SchemaType<'t>
 
impl<'t> SchemaType<'t>
sourcepub fn as_directory(&self) -> Option<&DirectorySchema<'t>>
 
pub fn as_directory(&self) -> Option<&DirectorySchema<'t>>
Returns the inner DirectorySchema if this node is a directory node
sourcepub fn as_file(&self) -> Option<&FileSchema<'t>>
 
pub fn as_file(&self) -> Option<&FileSchema<'t>>
Returns the inner FileSchema if this node is a file node
Trait Implementations§
source§impl<'t> Clone for SchemaType<'t>
 
impl<'t> Clone for SchemaType<'t>
source§fn clone(&self) -> SchemaType<'t>
 
fn clone(&self) -> SchemaType<'t>
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<'t> Debug for SchemaType<'t>
 
impl<'t> Debug for SchemaType<'t>
source§impl<'t> PartialEq for SchemaType<'t>
 
impl<'t> PartialEq for SchemaType<'t>
source§fn eq(&self, other: &SchemaType<'t>) -> bool
 
fn eq(&self, other: &SchemaType<'t>) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.impl<'t> StructuralPartialEq for SchemaType<'t>
Auto Trait Implementations§
impl<'t> RefUnwindSafe for SchemaType<'t>
impl<'t> Send for SchemaType<'t>
impl<'t> Sync for SchemaType<'t>
impl<'t> Unpin for SchemaType<'t>
impl<'t> UnwindSafe for SchemaType<'t>
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