pub struct Rule {
pub in_cache: bool,
pub priority: u32,
pub fields: Vec<DataKey>,
pub handle: MatcherFactory,
/* private fields */
}Fields§
§in_cache: bool§priority: u32§fields: Vec<DataKey>§handle: MatcherFactoryImplementations§
Source§impl Rule
impl Rule
pub fn exec(&self, chars: &[char]) -> Option<(Vec<Matched>, usize, usize)>
pub fn exec_queues( queues: &[BoxDynPattern], chars: &[char], ) -> Option<(Vec<Matched>, usize, usize)>
Sourcepub fn make_alias(selector: &'static str) -> Matcher
pub fn make_alias(selector: &'static str) -> Matcher
make a matcher by alias
pub fn data(&self, data: &[Matched]) -> MatcherData
pub fn add(context: &str, rule: Rule) -> Self
pub fn param<T: Into<SavedDataKey>>( params: &MatcherData, v: T, ) -> Option<&'static str>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rule
impl !RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl !UnwindSafe for Rule
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