#[non_exhaustive]pub enum BodyPlan {
None,
Raw,
Stream,
}Expand description
What the caller must do after ServerConn::write_head.
§Examples
use http_net::BodyPlan;
let plan = BodyPlan::Raw;
assert!(matches!(plan, BodyPlan::Raw));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
The response is complete: there is no body to send (an empty body, a
HEAD request, a status without a body, or an upgrade).
Raw
Write the OutgoingBody::Full bytes as they are, right after the
head; the connection already counts the response as complete.
Stream
Stream the body with ServerConn::send_body (or
send_body_into) and end it with
ServerConn::end_body (or end_body_into).
Trait Implementations§
impl Copy for BodyPlan
impl Eq for BodyPlan
impl StructuralPartialEq for BodyPlan
Auto Trait Implementations§
impl Freeze for BodyPlan
impl RefUnwindSafe for BodyPlan
impl Send for BodyPlan
impl Sync for BodyPlan
impl Unpin for BodyPlan
impl UnsafeUnpin for BodyPlan
impl UnwindSafe for BodyPlan
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