pub enum OptionalEntry {
#[non_exhaustive] File {
uri: Option<FileUri>,
name: Option<String>,
last_modified: Option<SystemTime>,
len: Option<u64>,
mime_type: Option<String>,
},
#[non_exhaustive] Dir {
uri: Option<FileUri>,
name: Option<String>,
last_modified: Option<SystemTime>,
},
}
Variants§
#[non_exhaustive]File
Fields
This variant is marked as non-exhaustive
last_modified: Option<SystemTime>
If EntryOptions { last_modified, .. }
is set to true
,
this will never be None
.
#[non_exhaustive]Dir
Fields
This variant is marked as non-exhaustive
last_modified: Option<SystemTime>
If EntryOptions { last_modified, .. }
is set to true
,
this will never be None
.
Implementations§
Source§impl OptionalEntry
impl OptionalEntry
pub fn is_file(&self) -> bool
pub fn is_dir(&self) -> bool
Sourcepub fn uri_or_err(&self) -> Result<&FileUri>
pub fn uri_or_err(&self) -> Result<&FileUri>
If EntryOptions { uri, .. }
is set to true
,
this will never be error.
Sourcepub fn name_or_err(&self) -> Result<&str>
pub fn name_or_err(&self) -> Result<&str>
If EntryOptions { name, .. }
is set to true
,
this will never be error.
Sourcepub fn last_modified_or_err(&self) -> Result<SystemTime>
pub fn last_modified_or_err(&self) -> Result<SystemTime>
If EntryOptions { last_modified, .. }
is set to true
,
this will never be error.
Sourcepub fn file_mime_type_or_err(&self) -> Result<&str>
pub fn file_mime_type_or_err(&self) -> Result<&str>
If a file and EntryOptions { mime_type, .. }
is set to true
,
this will never be error.
Sourcepub fn file_len_or_err(&self) -> Result<u64>
pub fn file_len_or_err(&self) -> Result<u64>
If a file and EntryOptions { len, .. }
is set to true
,
this will never be error.
Sourcepub fn uri(&self) -> Option<&FileUri>
pub fn uri(&self) -> Option<&FileUri>
If EntryOptions { uri, .. }
is set to true
,
this will never be None
.
Sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
If EntryOptions { name, .. }
is set to true
,
this will never be None
.
Sourcepub fn last_modified(&self) -> Option<SystemTime>
pub fn last_modified(&self) -> Option<SystemTime>
If EntryOptions { last_modified, .. }
is set to true
,
this will never be None
.
Sourcepub fn file_mime_type(&self) -> Option<&str>
pub fn file_mime_type(&self) -> Option<&str>
If a file and EntryOptions { mime_type, .. }
is set to true
,
this will never be None
.
Trait Implementations§
Source§impl Clone for OptionalEntry
impl Clone for OptionalEntry
Source§fn clone(&self) -> OptionalEntry
fn clone(&self) -> OptionalEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more