Skip to main content

FileExtension

Enum FileExtension 

Source
#[non_exhaustive]
pub enum FileExtension {
Show 213 variants ThreeFr, ThreeG2, ThreeGp, ThreeGpp, SevenZ, Aac, Abw, Ac3, Ace, Ai, Aif, Aifc, Aiff, Alz, Amr, Arc, Arj, Arw, Au, Avi, Avif, Azw, Azw3, Azw4, Bmp, Bz, Bz2, Cab, Caf, Cavs, Cbc, Cbr, Cbz, Cdr, Cgm, Chm, Cpio, Cr2, Cr3, Crw, Csv, Dcr, Deb, Djvu, Dmg, Dng, Doc, Docm, Docx, Dot, Dotx, Dps, Dss, Dv, Dvr, Dwf, Dwg, Dxf, Emf, Eml, Eot, Eps, Epub, Erf, Et, Fb2, Flac, Flv, Gif, Gz, Heic, Heif, Htm, Html, Htmlz, Hwp, Hwpx, Icns, Ico, Img, Iso, Jar, Jfif, Jpeg, Jpg, Key, Lha, Lit, Lrf, Lwp, Lz, Lzma, Lzo, M2ts, M4a, M4b, M4v, Md, Mkv, Mobi, Mod, Mos, Mov, Mp3, Mp4, Mpeg, Mpg, Mrw, Mts, Mxf, Nef, Numbers, Odd, Odg, Odp, Ods, Odt, Oeb, Oga, Ogg, Ogv, Opus, Orf, Otf, Pages, Pdb, Pdf, Pef, Pml, Png, Pot, Potx, Ppm, Pps, Ppsx, Ppt, Pptm, Pptx, Prc, Ps, Psb, Psd, Pub, Raf, Rar, Raw, Rb, Rm, Rmvb, Rpm, Rst, Rtf, Rw2, Rz, Sda, Sdc, Sdw, Sf2, Sfark, Sk, Sk1, Snb, Svg, Svgz, Swf, Tar, Tar7z, TarBz, TarBz2, TarGz, TarLzo, TarXz, TarZ, Tbz, Tbz2, Tcr, Tex, Tga, Tgz, Tif, Tiff, Ts, Ttf, Txt, Txtz, Tz, Tzo, Vob, Voc, Vsd, Vtt, Wav, Weba, Webm, Webp, Wma, Wmf, Wmv, Woff, Woff2, Wpd, Wps, Wtv, X3f, Xcf, Xls, Xlsm, Xlsx, Xps, Xz, Z, Zabw, Zip,
}
Expand description

Supported CloudConvert file extension tokens.

Values serialize to the lowercase extension token CloudConvert expects, without a leading dot. The list is derived from CloudConvert’s operations metadata endpoint.

use cloudconvert_sdk::FileExtension;

assert_eq!(FileExtension::Pdf.as_str(), "pdf");
assert_eq!(".TAR.GZ".parse::<FileExtension>().unwrap(), FileExtension::TarGz);
assert_eq!(
    serde_json::to_value(FileExtension::SevenZ).unwrap(),
    serde_json::json!("7z")
);

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.
§

ThreeFr

§

ThreeG2

§

ThreeGp

§

ThreeGpp

§

SevenZ

§

Aac

§

Abw

§

Ac3

§

Ace

§

Ai

§

Aif

§

Aifc

§

Aiff

§

Alz

§

Amr

§

Arc

§

Arj

§

Arw

§

Au

§

Avi

§

Avif

§

Azw

§

Azw3

§

Azw4

§

Bmp

§

Bz

§

Bz2

§

Cab

§

Caf

§

Cavs

§

Cbc

§

Cbr

§

Cbz

§

Cdr

§

Cgm

§

Chm

§

Cpio

§

Cr2

§

Cr3

§

Crw

§

Csv

§

Dcr

§

Deb

§

Djvu

§

Dmg

§

Dng

§

Doc

§

Docm

§

Docx

§

Dot

§

Dotx

§

Dps

§

Dss

§

Dv

§

Dvr

§

Dwf

§

Dwg

§

Dxf

§

Emf

§

Eml

§

Eot

§

Eps

§

Epub

§

Erf

§

Et

§

Fb2

§

Flac

§

Flv

§

Gif

§

Gz

§

Heic

§

Heif

§

Htm

§

Html

§

Htmlz

§

Hwp

§

Hwpx

§

Icns

§

Ico

§

Img

§

Iso

§

Jar

§

Jfif

§

Jpeg

§

Jpg

§

Key

§

Lha

§

Lit

§

Lrf

§

Lwp

§

Lz

§

Lzma

§

Lzo

§

M2ts

§

M4a

§

M4b

§

M4v

§

Md

§

Mkv

§

Mobi

§

Mod

§

Mos

§

Mov

§

Mp3

§

Mp4

§

Mpeg

§

Mpg

§

Mrw

§

Mts

§

Mxf

§

Nef

§

Numbers

§

Odd

§

Odg

§

Odp

§

Ods

§

Odt

§

Oeb

§

Oga

§

Ogg

§

Ogv

§

Opus

§

Orf

§

Otf

§

Pages

§

Pdb

§

Pdf

§

Pef

§

Pml

§

Png

§

Pot

§

Potx

§

Ppm

§

Pps

§

Ppsx

§

Ppt

§

Pptm

§

Pptx

§

Prc

§

Ps

§

Psb

§

Psd

§

Pub

§

Raf

§

Rar

§

Raw

§

Rb

§

Rm

§

Rmvb

§

Rpm

§

Rst

§

Rtf

§

Rw2

§

Rz

§

Sda

§

Sdc

§

Sdw

§

Sf2

§

Sfark

§

Sk

§

Sk1

§

Snb

§

Svg

§

Svgz

§

Swf

§

Tar

§

Tar7z

§

TarBz

§

TarBz2

§

TarGz

§

TarLzo

§

TarXz

§

TarZ

§

Tbz

§

Tbz2

§

Tcr

§

Tex

§

Tga

§

Tgz

§

Tif

§

Tiff

§

Ts

§

Ttf

§

Txt

§

Txtz

§

Tz

§

Tzo

§

Vob

§

Voc

§

Vsd

§

Vtt

§

Wav

§

Weba

§

Webm

§

Webp

§

Wma

§

Wmf

§

Wmv

§

Woff

§

Woff2

§

Wpd

§

Wps

§

Wtv

§

X3f

§

Xcf

§

Xls

§

Xlsm

§

Xlsx

§

Xps

§

Xz

§

Z

§

Zabw

§

Zip

Implementations§

Source§

impl FileExtension

Source

pub const ALL: &'static [Self]

All known file extensions in sorted order.

Source

pub const fn as_str(self) -> &'static str

Returns the extension token CloudConvert expects.

Source

pub fn parse(value: &str) -> Result<Self, ParseFileExtensionError>

Parses a CloudConvert extension token.

Leading dots, surrounding whitespace and ASCII case differences are normalized before matching.

use cloudconvert_sdk::FileExtension;

assert_eq!(FileExtension::parse(" .PDF ").unwrap(), FileExtension::Pdf);

Trait Implementations§

Source§

impl AsRef<str> for FileExtension

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for FileExtension

Source§

fn clone(&self) -> FileExtension

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FileExtension

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for FileExtension

Source§

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 Display for FileExtension

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&FileExtension> for String

Source§

fn from(value: &FileExtension) -> Self

Converts to this type from the input type.
Source§

impl From<FileExtension> for String

Source§

fn from(value: FileExtension) -> Self

Converts to this type from the input type.
Source§

impl FromStr for FileExtension

Source§

type Err = ParseFileExtensionError

The associated error which can be returned from parsing.
Source§

fn from_str(value: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for FileExtension

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for FileExtension

Source§

fn cmp(&self, other: &FileExtension) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for FileExtension

Source§

fn eq(&self, other: &FileExtension) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for FileExtension

Source§

fn partial_cmp(&self, other: &FileExtension) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for FileExtension

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for FileExtension

Source§

impl Eq for FileExtension

Source§

impl StructuralPartialEq for FileExtension

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,