Enum ContentType

Source
#[non_exhaustive]
pub enum ContentType {
Show 217 variants _3gp, Ace, Ai, Aidl, Apk, Applebplist, Appleplist, Asm, Asp, Autohotkey, Autoit, Awk, Batch, Bazel, Bib, Bmp, Bzip, C, Cab, Cat, Chm, Clojure, Cmake, Cobol, Coff, Coffeescript, Cpp, Crt, Crx, Cs, Csproj, Css, Csv, Dart, Deb, Dex, Dicom, Diff, Dm, Dmg, Doc, Dockerfile, Docx, Dsstore, Dwg, Dxf, Elf, Elixir, Emf, Eml, Empty, Epub, Erb, Erlang, Flac, Flv, Fortran, Gemfile, Gemspec, Gif, Gitattributes, Gitmodules, Go, Gradle, Groovy, Gzip, H5, Handlebars, Haskell, Hcl, Hlp, Htaccess, Html, Icns, Ico, Ics, Ignorefile, Ini, Internetshortcut, Ipynb, Iso, Jar, Java, Javabytecode, Javascript, Jinja, Jp2, Jpeg, Json, Jsonl, Julia, Kotlin, Latex, Lha, Lisp, Lnk, Lua, M3u, M4, Macho, Makefile, Markdown, Matlab, Mht, Midi, Mkv, Mp3, Mp4, Mscompress, Msi, Mum, Npy, Npz, Nupkg, Objectivec, Ocaml, Odp, Ods, Odt, Ogg, One, Onnx, Otf, Outlook, Parquet, Pascal, Pcap, Pdb, Pdf, Pebin, Pem, Perl, Php, Pickle, Png, Po, Postscript, Powershell, Ppt, Pptx, Prolog, Proteindb, Proto, Psd, Python, Pythonbytecode, Pytorch, Qt, R, Randombytes, Randomtxt, Rar, Rdf, Rpm, Rst, Rtf, Ruby, Rust, Scala, Scss, Sevenzip, Sgml, Shell, Smali, Snap, Solidity, Sql, Sqlite, Squashfs, Srt, Stlbinary, Stltext, Sum, Svg, Swf, Swift, Tar, Tcl, Textproto, Tga, Thumbsdb, Tiff, Toml, Torrent, Tsv, Ttf, Twig, Txt, Typescript, Undefined, Unknown, Vba, Vcxproj, Verilog, Vhdl, Vtt, Vue, Wasm, Wav, Webm, Webp, Winregistry, Wmf, Woff, Woff2, Xar, Xls, Xlsb, Xlsx, Xml, Xpi, Xz, Yaml, Yara, Zig, Zip, Zlibstream,
}
Expand description

Content types for regular files.

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

_3gp

3GPP multimedia file

§

Ace

ACE archive

§

Ai

Adobe Illustrator Artwork

§

Aidl

Android Interface Definition Language

§

Apk

Android package

§

Applebplist

Apple binary property list

§

Appleplist

Apple property list

§

Asm

Assembly

§

Asp

ASP source

§

Autohotkey

AutoHotKey script

§

Autoit

AutoIt script

§

Awk

Awk

§

Batch

DOS batch file

§

Bazel

Bazel build file

§

Bib

BibTeX

§

Bmp

BMP image data

§

Bzip

bzip2 compressed data

§

C

C source

§

Cab

Microsoft Cabinet archive data

§

Cat

Windows Catalog file

§

Chm

MS Windows HtmlHelp Data

§

Clojure

Clojure

§

Cmake

CMake build file

§

Cobol

Cobol

§

Coff

Intel 80386 COFF

§

Coffeescript

CoffeeScript

§

Cpp

C++ source

§

Crt

Certificates (binary format)

§

Crx

Google Chrome extension

§

Cs

C# source

§

Csproj

.NET project config

§

Css

CSS source

§

Csv

CSV document

§

Dart

Dart source

§

Deb

Debian binary package

§

Dex

Dalvik dex file

§

Dicom

DICOM

§

Diff

Diff file

§

Dm

Dream Maker

§

Dmg

Apple disk image

§

Doc

Microsoft Word CDF document

§

Dockerfile

Dockerfile

§

Docx

Microsoft Word 2007+ document

§

Dsstore

Application Desktop Services Store

§

Dwg

Autocad Drawing

§

Dxf

Audocad Drawing Exchange Format

§

Elf

ELF executable

§

Elixir

Elixir script

§

Emf

Windows Enhanced Metafile image data

§

Eml

RFC 822 mail

§

Empty

Empty file

§

Epub

EPUB document

§

Erb

Embedded Ruby source

§

Erlang

Erlang source

§

Flac

FLAC audio bitstream data

§

Flv

Flash Video

§

Fortran

Fortran

§

Gemfile

Gemfile file

§

Gemspec

Gemspec file

§

Gif

GIF image data

§

Gitattributes

Gitattributes file

§

Gitmodules

Gitmodules file

§

Go

Golang source

§

Gradle

Gradle source

§

Groovy

Groovy source

§

Gzip

gzip compressed data

§

H5

Hierarchical Data Format v5

§

Handlebars

Handlebars source

§

Haskell

Haskell source

§

Hcl

HashiCorp configuration language

§

Hlp

MS Windows help

§

Htaccess

Apache access configuration

§

Html

HTML document

§

Icns

Mac OS X icon

§

Ico

MS Windows icon resource

§

Ics

Internet Calendaring and Scheduling

§

Ignorefile

Ignorefile

§

Ini

INI configuration file

§

Internetshortcut

MS Windows Internet shortcut

§

Ipynb

Jupyter notebook

§

Iso

ISO 9660 CD-ROM filesystem data

§

Jar

Java archive data (JAR)

§

Java

Java source

§

Javabytecode

Java compiled bytecode

§

Javascript

JavaScript source

§

Jinja

Jinja template

§

Jp2

jpeg2000

§

Jpeg

JPEG image data

§

Json

JSON document

§

Jsonl

JSONL document

§

Julia

Julia source

§

Kotlin

Kotlin source

§

Latex

LaTeX document

§

Lha

LHarc archive

§

Lisp

Lisp source

§

Lnk

MS Windows shortcut

§

Lua

Lua

§

M3u

M3U playlist

§

M4

GNU Macro

§

Macho

Mach-O executable

§

Makefile

Makefile source

§

Markdown

Markdown document

§

Matlab

Matlab Source

§

Mht

MHTML document

§

Midi

Midi

§

Mkv

Matroska

§

Mp3

MP3 media file

§

Mp4

MP4 media file

§

Mscompress

MS Compress archive data

§

Msi

Microsoft Installer file

§

Mum

Windows Update Package file

§

Npy

Numpy Array

§

Npz

Numpy Arrays Archive

§

Nupkg

NuGet Package

§

Objectivec

ObjectiveC source

§

Ocaml

OCaml

§

Odp

OpenDocument Presentation

§

Ods

OpenDocument Spreadsheet

§

Odt

OpenDocument Text

§

Ogg

Ogg data

§

One

One Note

§

Onnx

Open Neural Network Exchange

§

Otf

OpenType font

§

Outlook

MS Outlook Message

§

Parquet

Apache Parquet

§

Pascal

Pascal source

§

Pcap

pcap capture file

§

Pdb

Windows Program Database

§

Pdf

PDF document

§

Pebin

PE Windows executable

§

Pem

PEM certificate

§

Perl

Perl source

§

Php

PHP source

§

Pickle

Python pickle

§

Png

PNG image

§

Po

Portable Object (PO) for i18n

§

Postscript

PostScript document

§

Powershell

Powershell source

§

Ppt

Microsoft PowerPoint CDF document

§

Pptx

Microsoft PowerPoint 2007+ document

§

Prolog

Prolog source

§

Proteindb

Protein DB

§

Proto

Protocol buffer definition

§

Psd

Adobe Photoshop

§

Python

Python source

§

Pythonbytecode

Python compiled bytecode

§

Pytorch

Pytorch storage file

§

Qt

QuickTime

§

R

R (language)

§

Randombytes

Random bytes

§

Randomtxt

Random text

§

Rar

RAR archive data

§

Rdf

Resource Description Framework document (RDF)

§

Rpm

RedHat Package Manager archive (RPM)

§

Rst

ReStructuredText document

§

Rtf

Rich Text Format document

§

Ruby

Ruby source

§

Rust

Rust source

§

Scala

Scala source

§

Scss

SCSS source

§

Sevenzip

7-zip archive data

§

Sgml

sgml

§

Shell

Shell script

§

Smali

Smali source

§

Snap

Snap archive

§

Solidity

Solidity source

§

Sql

SQL source

§

Sqlite

SQLITE database

§

Squashfs

Squash filesystem

§

Srt

SubRip Text Format

§

Stlbinary

Stereolithography CAD (binary)

§

Stltext

Stereolithography CAD (text)

§

Sum

Checksum file

§

Svg

SVG Scalable Vector Graphics image data

§

Swf

Small Web File

§

Swift

Swift

§

Tar

POSIX tar archive

§

Tcl

Tickle

§

Textproto

Text protocol buffer

§

Tga

Targa image data

§

Thumbsdb

Windows thumbnail cache

§

Tiff

TIFF image data

§

Toml

Tom’s obvious, minimal language

§

Torrent

BitTorrent file

§

Tsv

TSV document

§

Ttf

TrueType Font data

§

Twig

Twig template

§

Txt

Generic text document

§

Typescript

TypeScript source

§

Undefined

Undefined

§

Unknown

Unknown binary data

§

Vba

MS Visual Basic source (VBA)

§

Vcxproj

Visual Studio MSBuild project

§

Verilog

Verilog source

§

Vhdl

VHDL source

§

Vtt

Web Video Text Tracks

§

Vue

Vue source

§

Wasm

Web Assembly

§

Wav

Waveform Audio file (WAV)

§

Webm

WebM media file

§

Webp

WebP media file

§

Winregistry

Windows Registry text

§

Wmf

Windows metafile

§

Woff

Web Open Font Format

§

Woff2

Web Open Font Format v2

§

Xar

XAR archive compressed data

§

Xls

Microsoft Excel CDF document

§

Xlsb

Microsoft Excel 2007+ document (binary format)

§

Xlsx

Microsoft Excel 2007+ document

§

Xml

XML document

§

Xpi

Compressed installation archive (XPI)

§

Xz

XZ compressed data

§

Yaml

YAML source

§

Yara

YARA rule

§

Zig

Zig source

§

Zip

Zip archive data

§

Zlibstream

zlib compressed data

Implementations§

Source§

impl ContentType

Source

pub fn info(self) -> &'static TypeInfo

Returns the content type information.

Trait Implementations§

Source§

impl Clone for ContentType

Source§

fn clone(&self) -> ContentType

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ContentType

Source§

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

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

impl PartialEq for ContentType

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 Copy for ContentType

Source§

impl Eq for ContentType

Source§

impl StructuralPartialEq for ContentType

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> 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, 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