pub struct TimeExpression<P> { /* private fields */ }Expand description
The concrete AbstractTimeExpressionParser: pattern caching and the extract flow.
Implementations§
Source§impl<P: TimeExpressionParser> TimeExpression<P>
impl<P: TimeExpressionParser> TimeExpression<P>
pub fn new(inner: P) -> TimeExpression<P>
Trait Implementations§
Source§impl<P: TimeExpressionParser> Parser for TimeExpression<P>
impl<P: TimeExpressionParser> Parser for TimeExpression<P>
Source§fn pattern(&self, _context: &ParsingContext) -> JsRegex
fn pattern(&self, _context: &ParsingContext) -> JsRegex
pattern(context). Return a clone of a cached regex; cloning is cheap.Source§fn extract(&self, context: &ParsingContext, m: &mut RegexMatch) -> Extracted
fn extract(&self, context: &ParsingContext, m: &mut RegexMatch) -> Extracted
extract(context, match). m.index is the byte offset of the match in context.text.
Like upstream, an extractor may move m.index before returning Extracted::None to
control where the search resumes.Auto Trait Implementations§
impl<P> !Freeze for TimeExpression<P>
impl<P> Forget for TimeExpression<P>
impl<P> RefUnwindSafe for TimeExpression<P>where
P: RefUnwindSafe,
impl<P> Send for TimeExpression<P>where
P: Send,
impl<P> Sync for TimeExpression<P>where
P: Sync,
impl<P> Unpin for TimeExpression<P>where
P: Unpin,
impl<P> UnsafeUnpin for TimeExpression<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for TimeExpression<P>where
P: UnwindSafe,
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