pub enum Grammar {
ObjectScript,
Sql,
Python,
Markdown,
Mdx,
Xml,
}Variants§
Implementations§
Source§impl Grammar
impl Grammar
Sourcepub fn from_name(input: &str) -> Option<Self>
pub fn from_name(input: &str) -> Option<Self>
Parses a grammar name or alias into a Grammar value.
The input is normalized to lowercase alphanumeric characters, so values
such as "ObjectScript", "objectscript-playground", and "os" are accepted.
Sourcepub fn canonical_name(self) -> &'static str
pub fn canonical_name(self) -> &'static str
Returns the canonical lowercase name for this grammar.
Sourcepub fn supported_names() -> &'static [&'static str]
pub fn supported_names() -> &'static [&'static str]
Returns the canonical grammar names accepted by the CLI-facing APIs.
Trait Implementations§
impl Copy for Grammar
impl Eq for Grammar
impl StructuralPartialEq for Grammar
Auto Trait Implementations§
impl Freeze for Grammar
impl RefUnwindSafe for Grammar
impl Send for Grammar
impl Sync for Grammar
impl Unpin for Grammar
impl UnsafeUnpin for Grammar
impl UnwindSafe for Grammar
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