pub struct Asked {
pub head: bool,
pub connect: bool,
}Expand description
What the request asked for, which decides how its response is framed
(RFC 9112 section 6.3): a response to HEAD has no body whatever its
fields say, and a 2xx to CONNECT turns the connection into a tunnel.
The input to parse_response_head.
§Examples
use http_net::Asked;
let after_head = Asked { head: true, ..Asked::default() };
assert!(after_head.head && !after_head.connect);Fields§
§head: boolThe request was HEAD.
connect: boolThe request was CONNECT.
Trait Implementations§
impl Copy for Asked
impl Eq for Asked
impl StructuralPartialEq for Asked
Auto Trait Implementations§
impl Freeze for Asked
impl RefUnwindSafe for Asked
impl Send for Asked
impl Sync for Asked
impl Unpin for Asked
impl UnsafeUnpin for Asked
impl UnwindSafe for Asked
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