Skip to main content

Download

Trait Download 

Source
pub trait Download: Write + Send {
    // Required methods
    fn bytes_written(&self) -> u64;
    fn take_error(&mut self) -> Option<FilesystemError>;
    fn publish<'async_trait>(
        self: Box<Self>,
        work: Arc<WorkBudget>,
    ) -> Pin<Box<dyn Future<Output = Result<(), FilesystemError>> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

Disposable streaming storage owned by the filesystem. Drop cleans up staging. publish consumes ownership; completion belongs to the enclosing effect history.

Required Methods§

Source

fn bytes_written(&self) -> u64

Source

fn take_error(&mut self) -> Option<FilesystemError>

Recover the typed filesystem failure behind an io::Write error.

Source

fn publish<'async_trait>( self: Box<Self>, work: Arc<WorkBudget>, ) -> Pin<Box<dyn Future<Output = Result<(), FilesystemError>> + Send + 'async_trait>>
where Self: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§