[−][src]Struct hinku::SpanningStream
A TokenStream that keeps track of the span advanced while parsing.
Implementations
impl<'a, S> SpanningStream<'a, S>
[src]
pub fn new(parent: &'a mut S) -> SpanningStream<'a, S>
[src]
Create a new SpanningStream by wrapping a mutable reference to a parent TokenStream.
pub fn span(self) -> Option<Span>
[src]
Return the part of the input parsed since creating the SpanningStream.
Trait Implementations
impl<'a, S, T> TokenStream<T> for SpanningStream<'a, S> where
S: TokenStream<T>,
[src]
S: TokenStream<T>,
Auto Trait Implementations
impl<'a, S> RefUnwindSafe for SpanningStream<'a, S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<'a, S> Send for SpanningStream<'a, S> where
S: Send,
S: Send,
impl<'a, S> Sync for SpanningStream<'a, S> where
S: Sync,
S: Sync,
impl<'a, S> Unpin for SpanningStream<'a, S>
impl<'a, S> !UnwindSafe for SpanningStream<'a, S>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, S> TokenStreamExt<T> for S where
S: TokenStream<T>,
[src]
S: TokenStream<T>,
fn take<P, R, E>(&mut self, parser: P) -> ParseResult<R, E> where
P: Fn(&mut dyn TokenStream<T>) -> ParseResult<R, E>,
[src]
P: Fn(&mut dyn TokenStream<T>) -> ParseResult<R, E>,
fn assert_token(&mut self, token: T) -> ParseResult<(), String> where
T: PartialEq<T>,
[src]
T: PartialEq<T>,
fn fork(&mut self) -> TokenStreamFork<T>
[src]
fn either<P1, P2, R1, R2>(
&mut self,
parser1: P1,
parser2: P2
) -> ParseResult<Either<R1, R2>, String> where
P1: Fn(&mut dyn TokenStream<T>) -> ParseResult<R1, String>,
P2: Fn(&mut dyn TokenStream<T>) -> ParseResult<R2, String>,
[src]
&mut self,
parser1: P1,
parser2: P2
) -> ParseResult<Either<R1, R2>, String> where
P1: Fn(&mut dyn TokenStream<T>) -> ParseResult<R1, String>,
P2: Fn(&mut dyn TokenStream<T>) -> ParseResult<R2, String>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,