#[non_exhaustive]pub enum LanguageHint<'a> {
Id(&'a str),
InfoString(&'a str),
Path(&'a str),
Auto,
}Expand description
A structured language hint accepted by the highlighter.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl<'a> LanguageHint<'a>
impl<'a> LanguageHint<'a>
Sourcepub fn as_str(&self) -> &'a str
pub fn as_str(&self) -> &'a str
Flattens the hint to the token resolve_language matches against.
Trait Implementations§
Source§impl<'a> Clone for LanguageHint<'a>
impl<'a> Clone for LanguageHint<'a>
Source§fn clone(&self) -> LanguageHint<'a>
fn clone(&self) -> LanguageHint<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for LanguageHint<'a>
Source§impl<'a> Debug for LanguageHint<'a>
impl<'a> Debug for LanguageHint<'a>
impl<'a> Eq for LanguageHint<'a>
Source§impl<'a> From<&'a str> for LanguageHint<'a>
impl<'a> From<&'a str> for LanguageHint<'a>
Source§impl<'a> PartialEq for LanguageHint<'a>
impl<'a> PartialEq for LanguageHint<'a>
impl<'a> StructuralPartialEq for LanguageHint<'a>
Auto Trait Implementations§
impl<'a> Freeze for LanguageHint<'a>
impl<'a> RefUnwindSafe for LanguageHint<'a>
impl<'a> Send for LanguageHint<'a>
impl<'a> Sync for LanguageHint<'a>
impl<'a> Unpin for LanguageHint<'a>
impl<'a> UnsafeUnpin for LanguageHint<'a>
impl<'a> UnwindSafe for LanguageHint<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.