pub enum FileType {
Directory,
Symlink,
Inferred(InferredType),
Ruled(ContentType),
}Expand description
File types.
The word file is used in the Linux sense where everything is a file. This could be equivalently understood as a path.
Variants§
Directory
The file is a directory.
Symlink
The file is a symbolic link.
Inferred(InferredType)
The file is a regular file and was identified using AI.
Ruled(ContentType)
The file is a regular file and was identified using rules.
Implementations§
Source§impl FileType
impl FileType
Sourcepub fn content_type(&self) -> Option<ContentType>
pub fn content_type(&self) -> Option<ContentType>
Returns the content type for regular files.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileType
impl RefUnwindSafe for FileType
impl Send for FileType
impl Sync for FileType
impl Unpin for FileType
impl UnwindSafe for FileType
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