pub enum BodySize {
None,
Sized(usize),
Stream,
}Expand description
Body size hint.
Variants§
None
Absence of body can be assumed from method or status code.
Will skip writing Content-Length header.
Sized(usize)
Known size body.
Will write Content-Length: N header.
Stream
Unknown size body.
Will not write Content-Length header. Can be used with chunked Transfer-Encoding.
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 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