[][src]Enum syntect::parsing::syntax_definition::ContextReference

pub enum ContextReference {
    Named(String),
    ByScope {
        scope: Scope,
        sub_context: Option<String>,
    },
    File {
        name: String,
        sub_context: Option<String>,
    },
    Inline(String),
    Direct(ContextId),
}

Variants

Named(String)
ByScope

Fields of ByScope

scope: Scopesub_context: Option<String>
File

Fields of File

name: Stringsub_context: Option<String>
Inline(String)
Direct(ContextId)

Implementations

impl ContextReference[src]

pub fn resolve<'a>(&self, syntax_set: &'a SyntaxSet) -> &'a Context[src]

find the pointed to context, panics if ref is not linked

pub fn id(&self) -> ContextId[src]

get the context ID this reference points to, panics if ref is not linked

Trait Implementations

impl Clone for ContextReference[src]

impl Debug for ContextReference[src]

impl<'de> Deserialize<'de> for ContextReference[src]

impl Eq for ContextReference[src]

impl PartialEq<ContextReference> for ContextReference[src]

impl Serialize for ContextReference[src]

impl StructuralEq for ContextReference[src]

impl StructuralPartialEq for ContextReference[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.