pub struct ParseReader<R: Read, P: SourcePos> {
inner: R,
buf: Vec<char>,
pos: P,
}
Fieldsยง
ยงinner: R
ยงbuf: Vec<char>
ยงpos: P
Implementationsยง
Trait Implementationsยง
Sourceยงimpl<'a, R: Read + 'a, P: SourcePos + 'a> ParseSource<'a> for ParseReader<R, P>
impl<'a, R: Read + 'a, P: SourcePos + 'a> ParseSource<'a> for ParseReader<R, P>
type Pos = P
type Str = String
type Source = R
fn source(&self) -> &Self::Source
fn curr_pos(&self) -> P
fn skip(&mut self, i: usize)
fn pop_head(&mut self) -> Option<char>
fn read_until_line_end(&mut self) -> (String, P)
fn trim_start(&mut self)
fn starts_with(&mut self, c: char) -> bool
fn read_while(&mut self, pred: impl FnMut(char) -> bool) -> Self::Str
fn read_until_with_brackets<const OPEN: char, const CLOSE: char>( &mut self, pred: impl FnMut(char) -> bool, ) -> Self::Str
fn peek_head(&mut self) -> Option<char>
fn read_n(&mut self, i: usize) -> Self::Str
fn read_until_str(&mut self, s: &str) -> Self::Str
fn read_until(&mut self, pred: impl FnMut(char) -> bool) -> Self::Str
Auto Trait Implementationsยง
impl<R, P> Freeze for ParseReader<R, P>
impl<R, P> RefUnwindSafe for ParseReader<R, P>where
R: RefUnwindSafe,
P: RefUnwindSafe,
impl<R, P> Send for ParseReader<R, P>
impl<R, P> Sync for ParseReader<R, P>
impl<R, P> Unpin for ParseReader<R, P>
impl<R, P> UnwindSafe for ParseReader<R, P>where
R: UnwindSafe,
P: UnwindSafe,
Blanket Implementationsยง
ยงimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
ยงtype ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
ยงfn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
ยงimpl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
ยงfn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
ยงimpl<T> Instrument for T
impl<T> Instrument for T
ยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
ยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more