Enum tokei::LanguageType
[−]
[src]
pub enum LanguageType { ActionScript, Ada, Agda, Asp, AspNet, Assembly, Autoconf, Bash, Batch, C, CHeader, CSharp, CShell, Clojure, CoffeeScript, Cogent, ColdFusion, ColdFusionScript, Coq, Cpp, CppHeader, Css, D, Dart, DeviceTree, Elixir, Elm, Erlang, FSharp, Forth, FortranLegacy, FortranModern, Fstar, GdScript, Glsl, Go, Handlebars, Haskell, Hex, Html, Idris, IntelHex, Isabelle, Jai, Java, JavaScript, Json, Jsx, Julia, Kotlin, Lean, Less, LinkerScript, Lisp, Lua, Makefile, Markdown, Mustache, Nim, OCaml, ObjectiveC, ObjectiveCpp, Oz, Pascal, Perl, Php, Polly, Prolog, Protobuf, Python, Qcl, R, Razor, ReStructuredText, Ruby, RubyHtml, Rust, Sass, Scala, Sh, Sml, Sql, Swift, Tcl, Tex, Text, Toml, TypeScript, UnrealScript, VimScript, Wolfram, Xml, Yaml, Zsh, }
Variants
ActionScript
Ada
Agda
Asp
AspNet
Assembly
Autoconf
Bash
Batch
C
CHeader
CSharp
CShell
Clojure
CoffeeScript
Cogent
ColdFusion
ColdFusionScript
Coq
Cpp
CppHeader
Css
D
Dart
DeviceTree
Elixir
Elm
Erlang
FSharp
Forth
FortranLegacy
FortranModern
Fstar
GdScript
Glsl
Go
Handlebars
Haskell
Hex
Html
Idris
IntelHex
Isabelle
Jai
Java
JavaScript
Json
Jsx
Julia
Kotlin
Lean
Less
LinkerScript
Lisp
Lua
Makefile
Markdown
Mustache
Nim
OCaml
ObjectiveC
ObjectiveCpp
Oz
Pascal
Perl
Php
Polly
Prolog
Protobuf
Python
Qcl
R
Razor
ReStructuredText
Ruby
RubyHtml
Rust
Sass
Scala
Sh
Sml
Sql
Swift
Tcl
Tex
Text
Toml
TypeScript
UnrealScript
VimScript
Wolfram
Xml
Yaml
Zsh
Methods
impl LanguageType
[src]
fn name(&self) -> &'static str
Returns the display name of a language.
let bash = LanguageType::Bash; assert_eq!(bash.name(), "BASH");
fn list() -> Vec<Self>
Provides every variant in a Vec
fn from_extension<P: AsRef<Path>>(entry: P) -> Option<Self>
Get language from it's file extension.
let rust = LanguageType::from_extension("./main.rs"); assert_eq!(rust, Some(LanguageType::Rust));
Trait Implementations
impl Clone for LanguageType
[src]
fn clone(&self) -> LanguageType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for LanguageType
[src]
impl Debug for LanguageType
[src]
impl Eq for LanguageType
[src]
impl Ord for LanguageType
[src]
fn cmp(&self, __arg_0: &LanguageType) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialEq for LanguageType
[src]
fn eq(&self, __arg_0: &LanguageType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl PartialOrd for LanguageType
[src]
fn partial_cmp(&self, __arg_0: &LanguageType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more