Trait Input

Source
pub trait Input<'src>:
    Sized
    + Clone
    + 'src {
    type Source: Source<'src>;
    type Item;

    // Required methods
    fn source_span(&self) -> SourceSpan<'src, Self::Source>;
    fn next(
        self,
    ) -> Result<Output<'src, Self, Self::Item>, Error<'src, Self::Source>>;
    fn next_async(
        self,
    ) -> impl Future<Output = Result<Output<'src, Self, Self::Item>, Error<'src, Self::Source>>>;
}

Required Associated Types§

Required Methods§

Source

fn source_span(&self) -> SourceSpan<'src, Self::Source>

Source

fn next( self, ) -> Result<Output<'src, Self, Self::Item>, Error<'src, Self::Source>>

Source

fn next_async( self, ) -> impl Future<Output = Result<Output<'src, Self, Self::Item>, Error<'src, Self::Source>>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'src> Input<'src> for StringInput<'src>