Skip to main content

SinkFactory

Trait SinkFactory 

Source
pub trait SinkFactory: Send {
    type Sink: Sink<Location = Self::Location> + 'static;
    type Location: DownloadLocation;

    // Required method
    fn make(
        &mut self,
        target: Target<'_>,
    ) -> impl Future<Output = Result<Self::Sink, Error>> + Send;
}
Expand description

Builds a per-item Sink. One factory drives a whole stream of items (singular call sites pass a one-element stream).

Required Associated Types§

Source

type Sink: Sink<Location = Self::Location> + 'static

Source

type Location: DownloadLocation

Required Methods§

Source

fn make( &mut self, target: Target<'_>, ) -> impl Future<Output = Result<Self::Sink, Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§