pub trait WriteFragmentProgress:
Debug
+ Sync
+ Send {
// Required methods
fn begin<'life0, 'life1, 'async_trait>(
&'life0 self,
fragment: &'life1 Fragment,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
fragment: &'life1 Fragment,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Progress of writing a Fragment.
When start writing a Fragment, WriteProgress::begin() will be called before
writing any data.
When stop writing a Fragment, WriteProgress::complete() will be called after.
This might be called concurrently when writing multiple Fragments. Therefore,
the methods require non-exclusive access to self.
This is an experimental API and may change in the future.
Required Methods§
Sourcefn begin<'life0, 'life1, 'async_trait>(
&'life0 self,
fragment: &'life1 Fragment,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn begin<'life0, 'life1, 'async_trait>(
&'life0 self,
fragment: &'life1 Fragment,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Indicate the beginning of writing a Fragment, with the in-flight multipart ID.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".