pub struct ParseOptions<'a> {
pub progress_callback: Option<&'a mut dyn FnMut(&ParseState) -> ControlFlow<()>>,
}Fields§
§progress_callback: Option<&'a mut dyn FnMut(&ParseState) -> ControlFlow<()>>Implementations§
Source§impl<'a> ParseOptions<'a>
impl<'a> ParseOptions<'a>
pub fn new() -> ParseOptions<'a>
pub fn progress_callback<F>(self, callback: &'a mut F) -> ParseOptions<'a>
Sourcepub fn reborrow(&mut self) -> ParseOptions<'_>
pub fn reborrow(&mut self) -> ParseOptions<'_>
Create a new ParseOptions with a shorter lifetime, borrowing from this one.
This is useful when you need to reuse parse options multiple times, e.g., calling
Parser::parse_with_options multiple times with the same options.
Trait Implementations§
Source§impl<'a> Default for ParseOptions<'a>
impl<'a> Default for ParseOptions<'a>
Source§fn default() -> ParseOptions<'a>
fn default() -> ParseOptions<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for ParseOptions<'a>
impl<'a> !RefUnwindSafe for ParseOptions<'a>
impl<'a> !Send for ParseOptions<'a>
impl<'a> !Sync for ParseOptions<'a>
impl<'a> Unpin for ParseOptions<'a>
impl<'a> UnsafeUnpin for ParseOptions<'a>
impl<'a> !UnwindSafe for ParseOptions<'a>
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