#[non_exhaustive]pub enum Family {
Image,
Audio,
Video,
}Expand description
A family of media a file can belong to.
Three members, because three is what a media type’s own first segment offers
that a renderer can do anything with. text and application are families
too and neither buys a disclosure — there is no preview of an
application/octet-stream — so naming them would be a member added for a
case nobody has.
It is the answer to “which disclosure”, not a validation rule.
Field::accept is what a host filters on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Trait Implementations§
impl Copy for Family
impl Eq for Family
impl StructuralPartialEq for Family
Auto Trait Implementations§
impl Freeze for Family
impl RefUnwindSafe for Family
impl Send for Family
impl Sync for Family
impl Unpin for Family
impl UnsafeUnpin for Family
impl UnwindSafe for Family
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