Skip to main content

AsyncInfoVisitor

Trait AsyncInfoVisitor 

Source
pub trait AsyncInfoVisitor {
    type Output;
    type Error;

    // Required method
    fn visit<'data: 'scope, 'scope>(
        &'scope mut self,
        info: &'scope TokenInfo<'data>,
        reader: &'scope Reader<'data>,
        source: &'scope SourceMap,
    ) -> impl Future<Output = Result<Self::Output, Self::Error>>;
}
Expand description

Asynchronous inspection keeps parsed information, its inherited reader and source map scoped across awaits. Output and errors cannot borrow a join.

Required Associated Types§

Source

type Output

Independently retained result that cannot borrow the joined information.

Source

type Error

Original callback failure that cannot borrow the joined information.

Required Methods§

Source

fn visit<'data: 'scope, 'scope>( &'scope mut self, info: &'scope TokenInfo<'data>, reader: &'scope Reader<'data>, source: &'scope SourceMap, ) -> impl Future<Output = Result<Self::Output, Self::Error>>

Uses the one parsed information model and its honest source map.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§