pub struct Matcher {
pub pattern: GcPtr<Pattern>,
/* private fields */
}Fields§
§pattern: GcPtr<Pattern>Implementations§
Source§impl Matcher
impl Matcher
pub fn new(pattern: Pattern, source: String, match_all: bool) -> Self
Sourcepub fn from_ptr(
pattern: GcPtr<Pattern>,
source: String,
match_all: bool,
) -> Self
pub fn from_ptr( pattern: GcPtr<Pattern>, source: String, match_all: bool, ) -> Self
As new, but sharing an already-allocated pattern — a #"…" literal
keeps its Pattern across evaluations, so its anchored form (see
Pattern::captures_full) is compiled once rather than per call.
pub fn next(&self) -> MatchPhase
pub fn capture(&self) -> Option<MatchResult>
pub fn phase(&self) -> MatchPhase
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Matcher
impl !RefUnwindSafe for Matcher
impl !Send for Matcher
impl !Sync for Matcher
impl !UnwindSafe for Matcher
impl Unpin for Matcher
impl UnsafeUnpin for Matcher
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