Struct iroh_blobs::get::fsm::AtBlobContent
source · pub struct AtBlobContent { /* private fields */ }
Expand description
State while we are reading content
Implementations§
source§impl AtBlobContent
impl AtBlobContent
sourcepub async fn next(self) -> BlobContentNext
pub async fn next(self) -> BlobContentNext
Read the next item, either content, an error, or the end of the blob
sourcepub async fn drain(self) -> Result<AtEndBlob, DecodeError>
pub async fn drain(self) -> Result<AtEndBlob, DecodeError>
Drain the response and throw away the result
sourcepub async fn concatenate_into_vec(
self
) -> Result<(AtEndBlob, Vec<u8>), DecodeError>
pub async fn concatenate_into_vec( self ) -> Result<(AtEndBlob, Vec<u8>), DecodeError>
Concatenate the entire response into a vec
sourcepub async fn write_all_batch<B>(
self,
writer: B
) -> Result<AtEndBlob, DecodeError>where
B: BaoBatchWriter,
pub async fn write_all_batch<B>(
self,
writer: B
) -> Result<AtEndBlob, DecodeError>where
B: BaoBatchWriter,
Write the entire stream for this blob to a batch writer.
sourcepub async fn write_all_with_outboard<D, O>(
self,
outboard: Option<O>,
data: D
) -> Result<AtEndBlob, DecodeError>where
D: AsyncSliceWriter,
O: OutboardMut,
pub async fn write_all_with_outboard<D, O>(
self,
outboard: Option<O>,
data: D
) -> Result<AtEndBlob, DecodeError>where
D: AsyncSliceWriter,
O: OutboardMut,
Write the entire blob to a slice writer and to an optional outboard.
The outboard is only written to if the blob is larger than a single chunk group.
sourcepub async fn write_all<D>(self, data: D) -> Result<AtEndBlob, DecodeError>where
D: AsyncSliceWriter,
pub async fn write_all<D>(self, data: D) -> Result<AtEndBlob, DecodeError>where
D: AsyncSliceWriter,
Write the entire blob to a slice writer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AtBlobContent
impl RefUnwindSafe for AtBlobContent
impl Send for AtBlobContent
impl Sync for AtBlobContent
impl Unpin for AtBlobContent
impl UnwindSafe for AtBlobContent
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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