#[repr(u8)]pub enum Extension {
AVIF = 0,
JXL = 1,
JPG = 2,
PNG = 3,
WEBP = 4,
GIF = 5,
WEBM = 6,
MP4 = 7,
Ugoira = 8,
Unknown = 9,
}
Expand description
Enum representing the 8 possible extensions a downloaded post can have.
Variants§
AVIF = 0
JXL = 1
JPG = 2
The JPG
variant also encompasses the other extensions a jpeg might have, including .jpg
, .jpeg
and .jfif
PNG = 3
The PNG
variant can also include the rare .apng
whenever it’s present.
WEBP = 4
GIF = 5
WEBM = 6
MP4 = 7
Ugoira = 8
Pixiv Ugoira is usually downloaded as a zip file with all frames without any additional metadata.
Unknown = 9
Used for any file whose extension is unknown or not currently supported by this library.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Extension
impl<'de> Deserialize<'de> for Extension
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
Source§impl Ord for Extension
impl Ord for Extension
Source§impl PartialOrd for Extension
impl PartialOrd for Extension
impl Copy for Extension
impl Eq for Extension
impl StructuralPartialEq for Extension
Auto Trait Implementations§
impl Freeze for Extension
impl RefUnwindSafe for Extension
impl Send for Extension
impl Sync for Extension
impl Unpin for Extension
impl UnwindSafe for Extension
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.