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

pub struct MatchPattern {
    pub has_captures: bool,
    pub regex: Regex,
    pub scope: Vec<Scope>,
    pub captures: Option<CaptureMapping>,
    pub operation: MatchOperation,
    pub with_prototype: Option<ContextReference>,
}

Fields

has_captures: boolregex: Regexscope: Vec<Scope>captures: Option<CaptureMapping>operation: MatchOperationwith_prototype: Option<ContextReference>

Methods

impl MatchPattern[src]

pub fn new(
    has_captures: bool,
    regex_str: String,
    scope: Vec<Scope>,
    captures: Option<CaptureMapping>,
    operation: MatchOperation,
    with_prototype: Option<ContextReference>
) -> MatchPattern
[src]

pub fn regex_with_refs(&self, region: &Region, text: &str) -> Regex[src]

Used by the parser to compile a regex which needs to reference regions from another matched pattern.

pub fn regex(&self) -> &Regex[src]

Trait Implementations

impl Clone for MatchPattern[src]

impl Debug for MatchPattern[src]

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

impl Eq for MatchPattern[src]

impl PartialEq<MatchPattern> for MatchPattern[src]

impl Serialize for MatchPattern[src]

impl StructuralEq for MatchPattern[src]

impl StructuralPartialEq for MatchPattern[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: 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.