pub enum Category {
Video,
Audio,
Image,
Archive,
Document,
Application,
DiskImage,
Font,
Data,
Markup,
Unknown,
}Expand description
Broad category, in the sense a download manager sorts by.
Variants§
Video
Audio
Image
Archive
Archive or compressed stream.
Document
Document or e-book.
Application
Executable, installer, or package.
DiskImage
Disk or filesystem image.
Font
Data
Structured data, source, or plain text.
Markup
Web page or markup — usually NOT what a download was meant to be.
Unknown
Implementations§
Source§impl Category
impl Category
Sourcepub const ALL: [Category; 11]
pub const ALL: [Category; 11]
Every variant, for exhaustive iteration.
Kept next to the enum so adding a variant means updating this list in
the same screenful — the compiler cannot enforce it, but the tests that
iterate ALL will fail on a variant whose tables were forgotten.
Sourcepub fn directory(self) -> &'static str
pub fn directory(self) -> &'static str
Conventional subdirectory name, matching what download managers use.
pub fn as_str(self) -> &'static str
Trait Implementations§
impl Copy for Category
impl Eq for Category
impl StructuralPartialEq for Category
Auto Trait Implementations§
impl Freeze for Category
impl RefUnwindSafe for Category
impl Send for Category
impl Sync for Category
impl Unpin for Category
impl UnsafeUnpin for Category
impl UnwindSafe for Category
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