pub struct MatchContext {
pub captures: HashMap<String, CapturedNode>,
}Expand description
Matcher context for accumulating captures
Fields§
§captures: HashMap<String, CapturedNode>Captured nodes during matching
Implementations§
Source§impl MatchContext
impl MatchContext
Sourcepub fn merge(&mut self, other: MatchContext)
pub fn merge(&mut self, other: MatchContext)
Merge another context’s captures
Sourcepub fn into_match_result(self) -> MatchResult
pub fn into_match_result(self) -> MatchResult
Convert to MatchResult
Trait Implementations§
Source§impl Debug for MatchContext
impl Debug for MatchContext
Source§impl Default for MatchContext
impl Default for MatchContext
Source§fn default() -> MatchContext
fn default() -> MatchContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MatchContext
impl RefUnwindSafe for MatchContext
impl Send for MatchContext
impl Sync for MatchContext
impl Unpin for MatchContext
impl UnsafeUnpin for MatchContext
impl UnwindSafe for MatchContext
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