Struct syntect::parsing::syntax_definition::MatchPattern [−][src]
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: bool
regex: Regex
scope: Vec<Scope>
captures: Option<CaptureMapping>
operation: MatchOperation
with_prototype: Option<ContextReference>
Implementations
pub fn new(
has_captures: bool,
regex_str: String,
scope: Vec<Scope>,
captures: Option<CaptureMapping>,
operation: MatchOperation,
with_prototype: Option<ContextReference>
) -> MatchPattern
Used by the parser to compile a regex which needs to reference regions from another matched pattern.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl !RefUnwindSafe for MatchPattern
impl Send for MatchPattern
impl Sync for MatchPattern
impl Unpin for MatchPattern
impl UnwindSafe for MatchPattern
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.