pub struct Parser<F: FnMut(Warning<'_>) = fn(Warning<'_>)> { /* private fields */ }Expand description
A configured parser.
Implementations§
Source§impl<F: FnMut(Warning<'_>)> Parser<F>
impl<F: FnMut(Warning<'_>)> Parser<F>
Sourcepub fn parse(&mut self, data: &str) -> Result<OpeningHoursExpression>
pub fn parse(&mut self, data: &str) -> Result<OpeningHoursExpression>
Parse an opening hours expression by using this parser.
Sourcepub fn with_warning_handler<G: FnMut(Warning<'_>)>(
self,
warning_handler: G,
) -> Parser<G>
pub fn with_warning_handler<G: FnMut(Warning<'_>)>( self, warning_handler: G, ) -> Parser<G>
Attach a warning handler callback to this parser.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for Parser<F>where
F: Freeze,
impl<F> RefUnwindSafe for Parser<F>where
F: RefUnwindSafe,
impl<F> Send for Parser<F>where
F: Send,
impl<F> Sync for Parser<F>where
F: Sync,
impl<F> Unpin for Parser<F>where
F: Unpin,
impl<F> UnsafeUnpin for Parser<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for Parser<F>where
F: 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