pub enum EmbeddedHttp<R> {
Req {
head: Request<()>,
body: Body<R>,
},
Resp {
req_head: Option<Request<()>>,
head: Response<()>,
body: Body<R>,
},
}Expand description
Embedded HTTP message inside an ICAP request.
Stores HTTP head and body together to avoid duplication.
Variants§
Req
Embedded HTTP request (typical for REQMOD).
Resp
Embedded HTTP response (typical for RESPMOD).
req_head carries the optional HTTP request context from the
req-hdr section of a RESPMOD request (RFC 3507 §4.4.1).
It is Some when the ICAP sender included the originating HTTP
request headers; None otherwise.
Implementations§
Source§impl<R> EmbeddedHttp<R>
impl<R> EmbeddedHttp<R>
Sourcepub const fn kind(&self) -> EmbeddedHttpKind
pub const fn kind(&self) -> EmbeddedHttpKind
Return whether this embedded message is an HTTP request or response.
Sourcepub const fn respmod_request_head(&self) -> Option<&HttpRequest<()>>
pub const fn respmod_request_head(&self) -> Option<&HttpRequest<()>>
Return the optional HTTP request context from a RESPMOD embedded message.
Present when the ICAP client included req-hdr in the Encapsulated
header of a RESPMOD request (RFC 3507 §4.4.1). Provides the HTTP request
that caused the response being modified.
Always None for Req variants.
Trait Implementations§
Auto Trait Implementations§
impl<R> !Freeze for EmbeddedHttp<R>
impl<R> !RefUnwindSafe for EmbeddedHttp<R>
impl<R> !UnwindSafe for EmbeddedHttp<R>
impl<R> Send for EmbeddedHttp<R>where
R: Send,
impl<R> Sync for EmbeddedHttp<R>where
R: Sync,
impl<R> Unpin for EmbeddedHttp<R>where
R: Unpin,
impl<R> UnsafeUnpin for EmbeddedHttp<R>where
R: UnsafeUnpin,
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