pub enum ParsedHttpMessage {
Request(HttpRequest),
Response(HttpResponse),
}Expand description
Classification of parsed HTTP message
Variants§
Implementations§
Source§impl ParsedHttpMessage
impl ParsedHttpMessage
Sourcepub fn is_request(&self) -> bool
pub fn is_request(&self) -> bool
Returns true if this is a request
Sourcepub fn is_response(&self) -> bool
pub fn is_response(&self) -> bool
Returns true if this is a response
Sourcepub fn as_request(&self) -> Option<&HttpRequest>
pub fn as_request(&self) -> Option<&HttpRequest>
Get the request if this is a request, None otherwise
Sourcepub fn as_response(&self) -> Option<&HttpResponse>
pub fn as_response(&self) -> Option<&HttpResponse>
Get the response if this is a response, None otherwise
Trait Implementations§
Source§impl Clone for ParsedHttpMessage
impl Clone for ParsedHttpMessage
Source§fn clone(&self) -> ParsedHttpMessage
fn clone(&self) -> ParsedHttpMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for ParsedHttpMessage
impl RefUnwindSafe for ParsedHttpMessage
impl Send for ParsedHttpMessage
impl Sync for ParsedHttpMessage
impl Unpin for ParsedHttpMessage
impl UnsafeUnpin for ParsedHttpMessage
impl UnwindSafe for ParsedHttpMessage
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