pub enum EntryType {
File {
mime_type: String,
},
Dir,
}
Variants§
Implementations§
Source§impl EntryType
impl EntryType
pub fn is_file(&self) -> bool
pub fn is_dir(&self) -> bool
Sourcepub fn file_mime_type(&self) -> Option<&str>
pub fn file_mime_type(&self) -> Option<&str>
If a file, this is no None.
If a directory, this is None.
Sourcepub fn into_file_mime_type(self) -> Option<String>
pub fn into_file_mime_type(self) -> Option<String>
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 into_file_mime_type_or_err(self) -> Result<String>
pub fn into_file_mime_type_or_err(self) -> Result<String>
If a file, this is no Err.
If a directory, this is Err.
pub fn mime_type(&self) -> Option<&str>
👎Deprecated: Use FileType::file_mime_type instead
pub fn into_mime_type(self) -> Option<String>
👎Deprecated: Use FileType::into_file_mime_type instead
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EntryType
impl<'de> Deserialize<'de> for EntryType
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
impl Eq for EntryType
impl StructuralPartialEq for EntryType
Auto Trait Implementations§
impl Freeze for EntryType
impl RefUnwindSafe for EntryType
impl Send for EntryType
impl Sync for EntryType
impl Unpin for EntryType
impl UnwindSafe for EntryType
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