pub struct ParserBuilder<R: BufRead, S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<R: BufRead, S: State> ParserBuilder<R, S>
impl<R: BufRead, S: State> ParserBuilder<R, S>
Sourcepub fn build(self) -> Parser<R>where
S: IsComplete,
pub fn build(self) -> Parser<R>where
S: IsComplete,
Finish building and return the requested object
Sourcepub fn reader(self, value: R) -> ParserBuilder<R, SetReader<S>>where
S::Reader: IsUnset,
pub fn reader(self, value: R) -> ParserBuilder<R, SetReader<S>>where
S::Reader: IsUnset,
Required.
The reader to use for input
Sourcepub fn options(self, value: ParserOptions) -> ParserBuilder<R, SetOptions<S>>where
S::Options: IsUnset,
pub fn options(self, value: ParserOptions) -> ParserBuilder<R, SetOptions<S>>where
S::Options: IsUnset,
Sourcepub fn maybe_options(
self,
value: Option<ParserOptions>,
) -> ParserBuilder<R, SetOptions<S>>where
S::Options: IsUnset,
pub fn maybe_options(
self,
value: Option<ParserOptions>,
) -> ParserBuilder<R, SetOptions<S>>where
S::Options: IsUnset,
Sourcepub fn source_info(
self,
value: SourceInfo,
) -> ParserBuilder<R, SetSourceInfo<S>>where
S::SourceInfo: IsUnset,
pub fn source_info(
self,
value: SourceInfo,
) -> ParserBuilder<R, SetSourceInfo<S>>where
S::SourceInfo: IsUnset,
Sourcepub fn maybe_source_info(
self,
value: Option<SourceInfo>,
) -> ParserBuilder<R, SetSourceInfo<S>>where
S::SourceInfo: IsUnset,
pub fn maybe_source_info(
self,
value: Option<SourceInfo>,
) -> ParserBuilder<R, SetSourceInfo<S>>where
S::SourceInfo: IsUnset,
Auto Trait Implementations§
impl<R, S> Freeze for ParserBuilder<R, S>where
R: Freeze,
impl<R, S> RefUnwindSafe for ParserBuilder<R, S>where
R: RefUnwindSafe,
impl<R, S> Send for ParserBuilder<R, S>where
R: Send,
impl<R, S> Sync for ParserBuilder<R, S>where
R: Sync,
impl<R, S> Unpin for ParserBuilder<R, S>where
R: Unpin,
impl<R, S> UnwindSafe for ParserBuilder<R, S>where
R: 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