pub enum BodySize {
None,
Empty,
Sized(u64),
Stream,
}Expand description
Size information used when encoding an HTTP message body.
Variants§
None
No body is present and no Content-Length header should be emitted.
An HTTP/1 response that may carry a body is still sent with
Content-Length: 0, otherwise its end could not be determined.
Empty
An empty body with a Content-Length: 0 header.
Sized(u64)
A body with a known byte length.
Stream
A streaming body with an unknown final length.
Implementations§
Trait Implementations§
impl Copy for BodySize
impl Eq for BodySize
impl StructuralPartialEq for BodySize
Auto Trait Implementations§
impl Freeze for BodySize
impl RefUnwindSafe for BodySize
impl Send for BodySize
impl Sync for BodySize
impl Unpin for BodySize
impl UnsafeUnpin for BodySize
impl UnwindSafe for BodySize
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.