pub enum Language {
Show 40 variants
Rust,
C,
Cpp,
Go,
Zig,
JavaScript,
TypeScript,
HTML,
CSS,
SCSS,
SASS,
Python,
Java,
CSharp,
Kotlin,
Scala,
Ruby,
PHP,
Haskell,
OCaml,
FSharp,
Erlang,
Elixir,
Clojure,
JSON,
YAML,
TOML,
XML,
Markdown,
SQL,
Bash,
PowerShell,
Batch,
R,
Julia,
Matlab,
Swift,
ObjectiveC,
Dart,
Unknown,
}
Expand description
Programming language classification
Variants§
Rust
C
Cpp
Go
Zig
JavaScript
TypeScript
HTML
CSS
SCSS
SASS
Python
Java
CSharp
Kotlin
Scala
Ruby
PHP
Haskell
OCaml
FSharp
Erlang
Elixir
Clojure
JSON
YAML
TOML
XML
Markdown
SQL
Bash
PowerShell
Batch
R
Julia
Matlab
Swift
ObjectiveC
Dart
Unknown
Implementations§
Source§impl Language
impl Language
Sourcepub fn from_extension(ext: &str) -> Self
pub fn from_extension(ext: &str) -> Self
Detect language from file extension
Sourcepub fn is_documentation(&self) -> bool
pub fn is_documentation(&self) -> bool
Check if this language is typically used for documentation
Sourcepub fn is_configuration(&self) -> bool
pub fn is_configuration(&self) -> bool
Check if this language is typically used for configuration
Sourcepub fn is_programming(&self) -> bool
pub fn is_programming(&self) -> bool
Check if this is a programming language (not markup/config)
Sourcepub fn extensions(&self) -> &'static [&'static str]
pub fn extensions(&self) -> &'static [&'static str]
Get the typical file extensions for this language
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Language
impl<'de> Deserialize<'de> for Language
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Ord for Language
impl Ord for Language
Source§impl PartialOrd for Language
impl PartialOrd 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