Skip to main content

AsyncRdfParser

Trait AsyncRdfParser 

Source
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§

Source

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,

Parse RDF data from an async reader

Source

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,

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.

Implementors§