Skip to main content

Sink

Trait Sink 

Source
pub trait Sink: Send {
    type Location: Send + 'static;

    // Required methods
    fn prepare(
        &mut self,
        target: Target<'_>,
    ) -> impl Future<Output = Result<Prepared<Self::Location>, Error>> + Send;
    fn write_chunk(
        &mut self,
        chunk: &[u8],
    ) -> impl Future<Output = Result<(), Error>> + Send;
    fn restart(&mut self) -> impl Future<Output = Result<(), Error>> + Send;
    fn finalize(
        self,
    ) -> impl Future<Output = Result<Self::Location, Error>> + Send;
}

Required Associated Types§

Source

type Location: Send + 'static

Required Methods§

Source

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

Source

fn write_chunk( &mut self, chunk: &[u8], ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn restart(&mut self) -> impl Future<Output = Result<(), Error>> + Send

Source

fn finalize(self) -> impl Future<Output = Result<Self::Location, Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§