pub struct ExportBaoProgress { /* private fields */ }
Expand description
A progress handle for a bao export operation.
Internally, this is a stream of EncodedItem
s. 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 ExportBaoProgress
impl ExportBaoProgress
Sourcepub fn hashes_with_index(self) -> impl Stream<Item = Result<(u64, Hash), Error>>
pub fn hashes_with_index(self) -> impl Stream<Item = Result<(u64, Hash), Error>>
Interprets this blob as a hash sequence and returns a stream of hashes.
Errors will be reported, but the iterator will nevertheless continue. If you get an error despite having asked for ranges that should be present, this means that the data is corrupted. It can still make sense to continue to get all non-corrupted sections.
Sourcepub fn hashes(self) -> impl Stream<Item = Result<Hash, Error>>
pub fn hashes(self) -> impl Stream<Item = Result<Hash, Error>>
Same as Self::hashes_with_index
, but without the indexes.
pub async fn bao_to_vec(self) -> RequestResult<Vec<u8>>
pub async fn data_to_bytes(self) -> ExportBaoResult<Bytes>
pub async fn data_to_vec(self) -> ExportBaoResult<Vec<u8>>
pub async fn write_quinn(self, target: &mut SendStream) -> ExportBaoResult<()>
pub fn into_byte_stream(self) -> impl Stream<Item = Result<Bytes>>
pub fn stream(self) -> impl Stream<Item = EncodedItem>
Auto Trait Implementations§
impl Freeze for ExportBaoProgress
impl !RefUnwindSafe for ExportBaoProgress
impl Send for ExportBaoProgress
impl !Sync for ExportBaoProgress
impl Unpin for ExportBaoProgress
impl !UnwindSafe for ExportBaoProgress
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