pub struct StreamingBody { /* private fields */ }Expand description
A streaming body that can be read in chunks
Implementations§
Source§impl StreamingBody
impl StreamingBody
Sourcepub fn from_reader<R>(reader: R, chunk_size: usize) -> Self
pub fn from_reader<R>(reader: R, chunk_size: usize) -> Self
Create a streaming body from an AsyncRead
Sourcepub async fn next_chunk(&mut self) -> Option<Result<Bytes>>
pub async fn next_chunk(&mut self) -> Option<Result<Bytes>>
Get the next chunk from the stream
Auto Trait Implementations§
impl Freeze for StreamingBody
impl !RefUnwindSafe for StreamingBody
impl Send for StreamingBody
impl !Sync for StreamingBody
impl Unpin for StreamingBody
impl !UnwindSafe for StreamingBody
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