pub struct AddProgress<'a> { /* private fields */ }
Expand description
A progress handle for an import operation.
Internally this is a stream of AddProgressItem
items. Working with this
stream directly can be inconvenient, so this struct provides some convenience
methods to work with the result.
It also implements IntoFuture
, so you can await it to get the TempTag
that
contains the hash of the added content and also protects the content.
If you want access to the stream, you can use the AddProgress::stream
method.
Implementations§
Source§impl<'a> AddProgress<'a>
impl<'a> AddProgress<'a>
pub async fn temp_tag(self) -> RequestResult<TempTag>
pub async fn with_named_tag( self, name: impl AsRef<[u8]>, ) -> RequestResult<HashAndFormat>
pub async fn with_tag(self) -> RequestResult<TagInfo>
pub async fn stream(self) -> impl Stream<Item = AddProgressItem>
Trait Implementations§
Source§impl<'a> IntoFuture for AddProgress<'a>
impl<'a> IntoFuture for AddProgress<'a>
Source§type Output = Result<TagInfo, RequestError>
type Output = Result<TagInfo, RequestError>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <AddProgress<'a> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <AddProgress<'a> as IntoFuture>::Output> + Send + 'a>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<'a> Freeze for AddProgress<'a>
impl<'a> !RefUnwindSafe for AddProgress<'a>
impl<'a> Send for AddProgress<'a>
impl<'a> !Sync for AddProgress<'a>
impl<'a> Unpin for AddProgress<'a>
impl<'a> !UnwindSafe for AddProgress<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more