pub enum Entry {
#[non_exhaustive] File {
uri: FileUri,
name: String,
last_modified: SystemTime,
len: u64,
mime_type: String,
},
#[non_exhaustive] Dir {
uri: FileUri,
name: String,
last_modified: SystemTime,
},
}
Variants§
#[non_exhaustive]File
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
last_modified: SystemTime
#[non_exhaustive]Dir
Implementations§
Source§impl Entry
impl Entry
pub fn is_file(&self) -> bool
pub fn is_dir(&self) -> bool
pub fn uri(&self) -> &FileUri
pub fn name(&self) -> &str
pub fn last_modified(&self) -> SystemTime
Sourcepub fn file_mime_type(&self) -> Option<&str>
pub fn file_mime_type(&self) -> Option<&str>
If file, this is no None.
If directory, this is None.
Sourcepub fn file_len(&self) -> Option<u64>
pub fn file_len(&self) -> Option<u64>
If a file, this is no None.
If a directory, this is None.
Sourcepub fn file_mime_type_or_err(&self) -> Result<&str>
pub fn file_mime_type_or_err(&self) -> Result<&str>
If a file, this is no Err.
If a directory, this is Err.
Sourcepub fn file_len_or_err(&self) -> Result<u64>
pub fn file_len_or_err(&self) -> Result<u64>
If a file, this is no Err.
If a directory, this is Err.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Entry
impl<'de> Deserialize<'de> for Entry
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
Source§impl TryFrom<OptionalEntry> for Entry
impl TryFrom<OptionalEntry> for Entry
impl Eq for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnwindSafe for Entry
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