Skip to main content

FileSink

Trait FileSink 

Source
pub trait FileSink {
    // Required method
    fn write<'a>(
        &'a mut self,
        bytes: &'a [u8],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + 'a>>;
}
Expand description

Where a promised file’s bytes go, in order: the host’s, which writes them into the file where the receiver chose, as NSFilePromiseProvider writes at the receiver’s URL.

Required Methods§

Source

fn write<'a>( &'a mut self, bytes: &'a [u8], ) -> Pin<Box<dyn Future<Output = Result<()>> + 'a>>

Appends bytes; resolves once the host has taken them.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§