#[non_exhaustive]pub enum Language {
Show 125 variants
Dotenv,
Abap,
Abnf,
Ats,
Ada,
Agda,
Arduino,
Assembly,
Astro,
Autohotkey,
BatchFile,
C,
CSharp,
CPlusPlus,
Cmake,
Css,
Csv,
Ceylon,
Clojure,
Coffeescript,
Coldfusion,
CommonLisp,
Coq,
Crystal,
D,
Dart,
Docker,
Elixir,
Elm,
EmacsLisp,
Emojicode,
Erlang,
FSharp,
FortranLegacy,
Forth,
FortranModern,
Gdscript,
Glsl,
GithubWorkflow,
Gleam,
Go,
Graphql,
Groovy,
Hcl,
Hlsl,
Html,
Haskell,
Haxe,
Holyc,
Idris,
IgnoreList,
Json,
JsonWithComments,
Java,
Javascript,
JinjaLike,
Jsonnet,
Jule,
Julia,
JupyterNotebook,
Kotlin,
Llvm,
Lua,
Makefile,
Markdown,
Mermaid,
Nim,
Nix,
Ocaml,
ObjectiveC,
Odin,
Openscad,
Org,
Oz,
Php,
Pascal,
Perl,
PlainText,
Powershell,
Processing,
Prolog,
ProtocolBuffer,
Pug,
Purescript,
Python,
PythonRequirementsFile,
Qml,
R,
Racket,
Raku,
Regex,
RenPy,
Ruby,
Rust,
Sql,
Svg,
Sass,
Scala,
Scheme,
Shell,
Solidity,
Svelte,
Swift,
Systemverilog,
Toml,
Tsv,
Tcl,
Tex,
Typescript,
Typespec,
Vhdl,
Vala,
Verilog,
VimScript,
VisualBasic,
Vue,
Webassembly,
Wolfram,
Xaml,
Xml,
Xsl,
Yaml,
Zig,
Fish,
RestructuredText,
}Expand description
The type of language. Returned by language detection.
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.
Dotenv
Abap
Abnf
Ats
Ada
Agda
Arduino
Assembly
Astro
Autohotkey
BatchFile
C
CSharp
CPlusPlus
Cmake
Css
Csv
Ceylon
Clojure
Coffeescript
Coldfusion
CommonLisp
Coq
Crystal
D
Dart
Docker
Elixir
Elm
EmacsLisp
Emojicode
Erlang
FSharp
FortranLegacy
Forth
FortranModern
Gdscript
Glsl
GithubWorkflow
Gleam
Go
Graphql
Groovy
Hcl
Hlsl
Html
Haskell
Haxe
Holyc
Idris
IgnoreList
Json
JsonWithComments
Java
Javascript
JinjaLike
Jsonnet
Jule
Julia
JupyterNotebook
Kotlin
Llvm
Lua
Makefile
Markdown
Mermaid
Nim
Nix
Ocaml
ObjectiveC
Odin
Openscad
Org
Oz
Php
Pascal
Perl
PlainText
Powershell
Processing
Prolog
ProtocolBuffer
Pug
Purescript
Python
PythonRequirementsFile
Qml
R
Racket
Raku
Regex
RenPy
Ruby
Rust
Sql
Svg
Sass
Scala
Scheme
Shell
Solidity
Svelte
Swift
Systemverilog
Toml
Tsv
Tcl
Tex
Typescript
Typespec
Vhdl
Vala
Verilog
VimScript
VisualBasic
Vue
Webassembly
Wolfram
Xaml
Xml
Xsl
Yaml
Zig
Fish
RestructuredText
Implementations§
Source§impl Language
impl Language
Sourcepub const fn nerd_font_glyph(&self) -> Option<&'static str>
pub const fn nerd_font_glyph(&self) -> Option<&'static str>
Gets the Nerd Font glyph associated with the language.
Source§impl Language
impl Language
Sourcepub fn from_extension(extension: &str) -> Vec<Language>
pub fn from_extension(extension: &str) -> Vec<Language>
Gets languages by extension.
Source§impl Language
impl Language
Sourcepub fn from_filename(filename: &str) -> Vec<Language>
pub fn from_filename(filename: &str) -> Vec<Language>
Gets languages by filename.
Source§impl Language
impl Language
Sourcepub fn from_interpreter(interpreter: &str) -> Vec<Language>
pub fn from_interpreter(interpreter: &str) -> Vec<Language>
Gets languages by interpreter (typically found as part of a shebang).
Trait Implementations§
Source§impl Serialize for Language
impl Serialize for Language
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serializes the language into a string.
impl Copy for Language
impl Eq for Language
impl StructuralPartialEq for Language
Auto Trait Implementations§
impl Freeze for Language
impl RefUnwindSafe for Language
impl Send for Language
impl Sync for Language
impl Unpin for Language
impl UnwindSafe for Language
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<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
Compare self to
key and return true if they are equal.