Struct iroh_blobs::get::fsm::AtBlobHeader
source · pub struct AtBlobHeader { /* private fields */ }
Expand description
State before reading a size header
Implementations§
source§impl AtBlobHeader
impl AtBlobHeader
sourcepub async fn next(self) -> Result<(AtBlobContent, u64), AtBlobHeaderNextError>
pub async fn next(self) -> Result<(AtBlobContent, u64), AtBlobHeaderNextError>
Read the size header, returning it and going into the Content
state.
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
For a request that does not request the complete blob, this will just concatenate the ranges that were requested.
sourcepub async fn write_all<D: AsyncSliceWriter>(
self,
data: D
) -> Result<AtEndBlob, DecodeError>
pub async fn write_all<D: AsyncSliceWriter>( self, data: D ) -> Result<AtEndBlob, DecodeError>
Write the entire blob to a slice 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_batch<B>(
self,
batch: B
) -> Result<AtEndBlob, DecodeError>where
B: BaoBatchWriter,
pub async fn write_all_batch<B>(
self,
batch: B
) -> Result<AtEndBlob, DecodeError>where
B: BaoBatchWriter,
Write the entire stream for this blob to a batch writer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AtBlobHeader
impl RefUnwindSafe for AtBlobHeader
impl Send for AtBlobHeader
impl Sync for AtBlobHeader
impl Unpin for AtBlobHeader
impl UnwindSafe for AtBlobHeader
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