[][src]Struct syntect::parsing::syntax_definition::Context

pub struct Context {
    pub meta_scope: Vec<Scope>,
    pub meta_content_scope: Vec<Scope>,
    pub meta_include_prototype: bool,
    pub clear_scopes: Option<ClearAmount>,
    pub prototype: Option<ContextId>,
    pub uses_backrefs: bool,
    pub patterns: Vec<Pattern>,
}

Fields

meta_scope: Vec<Scope>meta_content_scope: Vec<Scope>meta_include_prototype: bool

This being set false in the syntax file implies this field being set false, but it can also be set falso for contexts that don't include the prototype for other reasons

clear_scopes: Option<ClearAmount>prototype: Option<ContextId>

This is filled in by the linker at link time for contexts that have meta_include_prototype==true and are not included from the prototype.

uses_backrefs: boolpatterns: Vec<Pattern>

Implementations

impl Context[src]

pub fn new(meta_include_prototype: bool) -> Context[src]

impl Context[src]

pub fn match_at(&self, index: usize) -> &MatchPattern[src]

Returns the match pattern at an index, panics if the thing isn't a match pattern

Trait Implementations

impl Clone for Context[src]

impl Debug for Context[src]

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

impl Eq for Context[src]

impl PartialEq<Context> for Context[src]

impl Serialize for Context[src]

impl StructuralEq for Context[src]

impl StructuralPartialEq for Context[src]

Auto Trait Implementations

impl !RefUnwindSafe for Context

impl Send for Context

impl Sync for Context

impl Unpin for Context

impl UnwindSafe for Context

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.