#[non_exhaustive]pub enum Format {
Show 24 variants
Jpeg,
Png,
Webp,
Pdf,
Tiff,
Gif,
Heif,
Avif,
Docx,
Xlsx,
Pptx,
Odt,
Ods,
Odp,
Svg,
Jxl,
Flac,
Wav,
Mp3,
Ogg,
Opus,
OggFlac,
Mp4,
M4a,
}Expand description
A format strypt has a handler for.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Jpeg
JPEG, in a JFIF or EXIF container.
Png
PNG.
Webp
WebP, which is a RIFF container.
PDF.
Tiff
TIFF, including the multi-page files scanners produce.
Gif
GIF, in either the 87a or the 89a spelling.
Heif
HEIF — .heic and .heif, the format an iPhone photograph arrives in.
Avif
AVIF: the same container as HEIF, carrying AV1 rather than HEVC.
Docx
A WordprocessingML document — .docx.
Xlsx
A SpreadsheetML workbook — .xlsx.
Pptx
A PresentationML presentation — .pptx.
Odt
An OpenDocument text document — .odt.
Ods
An OpenDocument spreadsheet — .ods.
Odp
An OpenDocument presentation — .odp.
Svg
SVG, which is XML text rather than a container of encoded pixels.
Jxl
JPEG XL, in either of its two spellings: a bare codestream or a BMFF container.
Flac
FLAC, in its native spelling — a fLaC marker and a list of metadata blocks.
Wav
WAV: a RIFF container of form type WAVE. RF64 and BW64 are a different container and
are named separately in detect_unsupported.
Mp3
MP3: MPEG-1 Audio Layer III frames, with or without the tags glued to either end of them.
Ogg
Ogg Vorbis. One handler serves all three Ogg spellings; they are separate formats here because they are separate mappings with separate header packets (ADR-0041).
Opus
Opus, in its Ogg encapsulation (RFC 7845). The only encapsulation strypt handles.
OggFlac
FLAC carried in Ogg pages rather than in its native container.
Mp4
MP4: the ISO base media file format carrying tracks. .mp4 and .m4v.
M4a
M4A: the same container carrying audio only. .m4a and .m4b.
Implementations§
Source§impl Format
impl Format
Sourcepub const fn id(self) -> &'static str
pub const fn id(self) -> &'static str
The stable lowercase identifier used in reports and JSON output.
Stable across releases: front-ends and downstream scripts key on it.
Sourcepub const fn conventional_extension(self) -> &'static str
pub const fn conventional_extension(self) -> &'static str
The conventional extension for this format, without a leading dot.
Used when deriving a default output filename. Never used to detect anything.
Trait Implementations§
impl Copy for Format
impl Eq for Format
Source§impl Ord for Format
impl Ord for Format
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Format
impl PartialOrd for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.