Enum xitca_http::body::BodySize
source · 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§
source§impl PartialEq for BodySize
impl PartialEq for BodySize
impl Copy for BodySize
impl Eq for BodySize
impl StructuralEq for BodySize
impl StructuralPartialEq for BodySize
Auto Trait Implementations§
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