pub trait AsyncParser<Output> {
// Required methods
fn parse_async<R: AsyncRead + Unpin>(
&self,
reader: R,
) -> impl Future<Output = TurtleResult<Vec<Output>>> + Send;
fn for_async_reader<R: AsyncBufRead + Unpin>(
&self,
reader: R,
) -> Box<dyn Stream<Item = TurtleResult<Output>> + Unpin>;
}Available on crate feature
async-tokio only.Expand description
Async parser trait for Tokio integration
Required Methods§
Sourcefn parse_async<R: AsyncRead + Unpin>(
&self,
reader: R,
) -> impl Future<Output = TurtleResult<Vec<Output>>> + Send
fn parse_async<R: AsyncRead + Unpin>( &self, reader: R, ) -> impl Future<Output = TurtleResult<Vec<Output>>> + Send
Parse from an async reader
Sourcefn for_async_reader<R: AsyncBufRead + Unpin>(
&self,
reader: R,
) -> Box<dyn Stream<Item = TurtleResult<Output>> + Unpin>
fn for_async_reader<R: AsyncBufRead + Unpin>( &self, reader: R, ) -> Box<dyn Stream<Item = TurtleResult<Output>> + Unpin>
Create an async stream for streaming parsing
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".