pub struct ExportRangesProgress { /* private fields */ }Expand description
A progress handle for a bao export operation.
Internally, this is a stream of EncodedItems. Using this stream directly
is often inconvenient, so there are a number of higher level methods to
process the stream.
You can get access to the underlying stream using the ExportBaoProgress::stream method.
Implementations§
Source§impl ExportRangesProgress
impl ExportRangesProgress
Sourcepub fn stream(self) -> impl Stream<Item = ExportRangesItem>
pub fn stream(self) -> impl Stream<Item = ExportRangesItem>
A raw stream of [ExportRangesItem]s.
Ranges will be rounded up to chunk boundaries. So if you request a range of 0..100, you will get the entire first chunk, 0..1024.
It is up to the caller to clip the ranges to the requested ranges.
Sourcepub async fn concatenate(self) -> RequestResult<Vec<u8>>
pub async fn concatenate(self) -> RequestResult<Vec<u8>>
Concatenate all the data into a single Bytes.
Auto Trait Implementations§
impl Freeze for ExportRangesProgress
impl !RefUnwindSafe for ExportRangesProgress
impl Send for ExportRangesProgress
impl !Sync for ExportRangesProgress
impl Unpin for ExportRangesProgress
impl UnsafeUnpin for ExportRangesProgress
impl !UnwindSafe for ExportRangesProgress
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more