pub struct AtBlobContent<R: RecvStream = RecvStream> { /* private fields */ }
Expand description
State while we are reading content
Implementations§
Source§impl<R: RecvStream> AtBlobContent<R>
impl<R: RecvStream> AtBlobContent<R>
Sourcepub async fn next(self) -> BlobContentNext<R>
pub async fn next(self) -> BlobContentNext<R>
Read the next item, either content, an error, or the end of the blob
Sourcepub async fn drain(self) -> Result<AtEndBlob<R>, DecodeError>
pub async fn drain(self) -> Result<AtEndBlob<R>, DecodeError>
Drain the response and throw away the result
Sourcepub async fn concatenate_into_vec(
self,
) -> Result<(AtEndBlob<R>, Vec<u8>), DecodeError>
pub async fn concatenate_into_vec( self, ) -> Result<(AtEndBlob<R>, Vec<u8>), DecodeError>
Concatenate the entire response into a vec
Sourcepub async fn write_all_with_outboard<D, O>(
self,
outboard: Option<O>,
data: D,
) -> Result<AtEndBlob<R>, DecodeError>where
D: AsyncSliceWriter,
O: OutboardMut,
pub async fn write_all_with_outboard<D, O>(
self,
outboard: Option<O>,
data: D,
) -> Result<AtEndBlob<R>, 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<R>, DecodeError>where
D: AsyncSliceWriter,
pub async fn write_all<D>(self, data: D) -> Result<AtEndBlob<R>, DecodeError>where
D: AsyncSliceWriter,
Write the entire blob to a slice writer.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for AtBlobContent<R>
impl<R> RefUnwindSafe for AtBlobContent<R>where
R: RefUnwindSafe,
impl<R> Send for AtBlobContent<R>
impl<R> Sync for AtBlobContent<R>where
R: Sync,
impl<R> Unpin for AtBlobContent<R>
impl<R> UnwindSafe for AtBlobContent<R>where
R: UnwindSafe,
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