pub trait AsyncRdfParser: Send + Sync {
// Required methods
fn parse_async<'a, R>(
&'a self,
reader: R,
config: AsyncStreamingConfig,
progress: Option<ProgressCallback>,
cancel_token: Option<Arc<AtomicBool>>,
) -> BoxFuture<'a, Result<Vec<Quad>>>
where R: AsyncRead + Unpin + Send + 'a;
fn parse_with_handler_async<'a, R, F, Fut>(
&'a self,
reader: R,
handler: F,
config: AsyncStreamingConfig,
progress: Option<ProgressCallback>,
cancel_token: Option<Arc<AtomicBool>>,
) -> BoxFuture<'a, Result<()>>
where R: AsyncRead + Unpin + Send + 'a,
F: FnMut(Quad) -> Fut + Send + 'a,
Fut: Future<Output = Result<()>> + Send + 'a;
}Expand description
Trait for async RDF parsing with streaming input
Required Methods§
Sourcefn parse_async<'a, R>(
&'a self,
reader: R,
config: AsyncStreamingConfig,
progress: Option<ProgressCallback>,
cancel_token: Option<Arc<AtomicBool>>,
) -> BoxFuture<'a, Result<Vec<Quad>>>
fn parse_async<'a, R>( &'a self, reader: R, config: AsyncStreamingConfig, progress: Option<ProgressCallback>, cancel_token: Option<Arc<AtomicBool>>, ) -> BoxFuture<'a, Result<Vec<Quad>>>
Parse RDF data from an async reader
Sourcefn parse_with_handler_async<'a, R, F, Fut>(
&'a self,
reader: R,
handler: F,
config: AsyncStreamingConfig,
progress: Option<ProgressCallback>,
cancel_token: Option<Arc<AtomicBool>>,
) -> BoxFuture<'a, Result<()>>
fn parse_with_handler_async<'a, R, F, Fut>( &'a self, reader: R, handler: F, config: AsyncStreamingConfig, progress: Option<ProgressCallback>, cancel_token: Option<Arc<AtomicBool>>, ) -> BoxFuture<'a, Result<()>>
Parse RDF data from an async reader with a custom handler
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.