Skip to main content

AsyncVisitor

Trait AsyncVisitor 

Source
pub trait AsyncVisitor {
    type Output;
    type Error;

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

Scoped carried decoding that can await caller-owned external input without allowing temporary joined bytes or their reader to escape in the result.

Required Associated Types§

Source

type Output

Independently retained result, not borrowed from a temporary join.

Source

type Error

Original source-independent callback cause.

Required Methods§

Source

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

Executes inside the actual nested reader/source-map lifetime.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§