[−][src]Struct hyper::Body
A Stream
for Chunk
s used in requests and responses.
Methods
impl Body
[src][−]
pub fn empty() -> Body
[src][−]
Return an empty body stream
pub fn pair() -> (Sender<Result<Chunk, Error>>, Body)
[src][−]
Return a body stream with an associated sender half
pub fn is_empty(&self) -> bool
[src][−]
Returns if this body was constructed via Body::empty()
.
Note
This does not detect if the body stream may be at the end, or
if the stream will not yield any chunks, in all cases. For instance,
a streaming body using chunked
encoding is not able to tell if
there are more chunks immediately.
Trait Implementations
impl Debug for Body
[src][+]
impl Default for Body
[src][+]
impl From<&'static [u8]> for Body
[src][+]
impl From<&'static str> for Body
[src][+]
impl From<Bytes> for Body
[src][+]
impl From<Chunk> for Body
[src][+]
impl From<Cow<'static, [u8]>> for Body
[src][+]
impl From<Cow<'static, str>> for Body
[src][+]
impl From<Option<Body>> for Body
[src][+]
impl From<Receiver<Result<Chunk, Error>>> for Body
[src][+]
impl From<String> for Body
[src][+]
impl From<Vec<u8>> for Body
[src][+]
impl Stream for Body
[src][+]
Auto Trait Implementations
impl !RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl !UnwindSafe for Body
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> StreamExt for T where
T: Stream + ?Sized,
[src][+]
T: Stream + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,