Enum tokei::LanguageType [] [src]

pub enum LanguageType {
    ActionScript,
    Ada,
    Asp,
    AspNet,
    Assembly,
    Autoconf,
    Bash,
    Batch,
    C,
    CHeader,
    CSharp,
    CShell,
    Clojure,
    CoffeeScript,
    ColdFusion,
    ColdFusionScript,
    Coq,
    Cpp,
    CppHeader,
    Css,
    D,
    Dart,
    DeviceTree,
    Elixir,
    Elm,
    Erlang,
    Forth,
    FortranLegacy,
    FortranModern,
    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,
    Sml,
    Sql,
    Swift,
    Tcl,
    Tex,
    Text,
    Toml,
    TypeScript,
    UnrealScript,
    VimScript,
    Wolfram,
    Xml,
    Yaml,
    Zsh,
}

Variants

Methods

impl LanguageType
[src]

Returns the display name of a language.

let bash = LanguageType::Bash;

assert_eq!(bash.name(), "BASH");

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for LanguageType
[src]

impl Debug for LanguageType
[src]

Formats the value using the given formatter.

impl Eq for LanguageType
[src]

impl Ord for LanguageType
[src]

This method returns an Ordering between self and other. Read more

impl PartialEq for LanguageType
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for LanguageType
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl From<String> for LanguageType
[src]

Performs the conversion.

impl<'a> From<&'a str> for LanguageType
[src]

Performs the conversion.

impl Display for LanguageType
[src]

Formats the value using the given formatter.