pub struct Language {
pub name: &'static str,
pub aliases: &'static [&'static str],
pub exts: &'static [&'static str],
pub analyze: AnalyzeFn,
}Expand description
One supported language: how to name it on the command line, which file extensions it claims, and how to analyze a file of that language.
Fields§
§name: &'static strCanonical name used in --lang and diagnostics (e.g. "rust").
aliases: &'static [&'static str]Additional accepted spellings for --lang (e.g. "rs" for Rust).
exts: &'static [&'static str]File extensions (without the dot) this language analyzes by default.
analyze: AnalyzeFnLower+score a single file of this 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 UnsafeUnpin 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more