Skip to main content

Loader

Trait Loader 

Source
pub trait Loader:
    DynClone
    + Send
    + Sync {
    type Output: Chunk;

    // Required method
    fn into_stream(self) -> IndexingStream<Self::Output>;

    // Provided methods
    fn into_stream_boxed(self: Box<Self>) -> IndexingStream<Self::Output> { ... }
    fn name(&self) -> &'static str { ... }
}
Expand description

Starting point of a stream

Required Associated Types§

Required Methods§

Provided Methods§

Source

fn into_stream_boxed(self: Box<Self>) -> IndexingStream<Self::Output>

Intended for use with Box

Only needed if you use trait objects (Box)

§Example
ⓘ
fn into_stream_boxed(self: Box<Self>) -> IndexingStream {
   self.into_stream()
 }
Source

fn name(&self) -> &'static str

Trait Implementations§

Source§

impl<O> Loader for Box<dyn Loader<Output = O>>
where O: Chunk,

Source§

type Output = O

Source§

fn into_stream( self, ) -> IndexingStream<<Box<dyn Loader<Output = O>> as Loader>::Output>

Source§

fn into_stream_boxed( self: Box<Box<dyn Loader<Output = O>>>, ) -> IndexingStream<<Box<dyn Loader<Output = O>> as Loader>::Output>

Intended for use with Box Read more
Source§

fn name(&self) -> &'static str

Source§

impl<O> Loader for &dyn Loader<Output = O>
where O: Chunk,

Source§

type Output = O

Source§

fn into_stream(self) -> IndexingStream<&dyn Loader<Output = O>::Output>

Source§

fn into_stream_boxed( self: Box<&dyn Loader<Output = O>>, ) -> IndexingStream<&dyn Loader<Output = O>::Output>

Intended for use with Box Read more
Source§

fn name(&self) -> &'static str

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<O> Loader for Box<dyn Loader<Output = O>>
where O: Chunk,

Source§

type Output = O

Source§

fn into_stream( self, ) -> IndexingStream<<Box<dyn Loader<Output = O>> as Loader>::Output>

Source§

fn into_stream_boxed( self: Box<Box<dyn Loader<Output = O>>>, ) -> IndexingStream<<Box<dyn Loader<Output = O>> as Loader>::Output>

Source§

fn name(&self) -> &'static str

Implementors§