pub enum ResponseBody {
Buffered(Vec<u8>),
Streaming(BoxBodyStream),
}Expand description
Re-exported public API. Response body: fully buffered, or a live stream of chunks.
Variants§
Implementations§
Source§impl ResponseBody
impl ResponseBody
Sourcepub fn as_buffered(&self) -> Option<&[u8]>
pub fn as_buffered(&self) -> Option<&[u8]>
Runs the as_buffered public API operation.
Sourcepub fn as_buffered_mut(&mut self) -> Option<&mut Vec<u8>>
pub fn as_buffered_mut(&mut self) -> Option<&mut Vec<u8>>
Runs the as_buffered_mut public API operation.
Sourcepub fn is_streaming(&self) -> bool
pub fn is_streaming(&self) -> bool
Runs the is_streaming public API operation.
Auto Trait Implementations§
impl !RefUnwindSafe for ResponseBody
impl !Sync for ResponseBody
impl !UnwindSafe for ResponseBody
impl Freeze for ResponseBody
impl Send for ResponseBody
impl Unpin for ResponseBody
impl UnsafeUnpin for ResponseBody
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more