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 duplicate 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>
impl<'t> StructuralPartialEq for SchemaType<'t>
Auto Trait Implementations§
impl<'t> Freeze for SchemaType<'t>
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