pub struct HttpRequestParts { /* private fields */ }Expand description
Owned neutral request parts useful for adapter composition and tests.
Implementations§
Source§impl HttpRequestParts
impl HttpRequestParts
Sourcepub fn with_header(self, name: HeaderName, value: HeaderValue) -> Self
pub fn with_header(self, name: HeaderName, value: HeaderValue) -> Self
Inserts or replaces one request header.
Inserts or replaces one parsed cookie.
Sourcepub fn with_path_parameter(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> SoapResult<Self>
pub fn with_path_parameter( self, name: impl Into<String>, value: impl Into<String>, ) -> SoapResult<Self>
Inserts or replaces one decoded route parameter.
Sourcepub fn with_query_parameter(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> SoapResult<Self>
pub fn with_query_parameter( self, name: impl Into<String>, value: impl Into<String>, ) -> SoapResult<Self>
Appends one decoded query parameter value.
Sourcepub const fn with_client_ip(self, client_ip: IpAddr) -> Self
pub const fn with_client_ip(self, client_ip: IpAddr) -> Self
Sets the normalized client IP after adapter-specific trusted proxy processing.
Sourcepub fn with_request_id(self, request_id: impl Into<MessageId>) -> Self
pub fn with_request_id(self, request_id: impl Into<MessageId>) -> Self
Sets the request identity.
Trait Implementations§
Source§impl Clone for HttpRequestParts
impl Clone for HttpRequestParts
Source§fn clone(&self) -> HttpRequestParts
fn clone(&self) -> HttpRequestParts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpRequestParts
impl Debug for HttpRequestParts
Source§impl HttpRequestView for HttpRequestParts
impl HttpRequestView for HttpRequestParts
Returns one parsed cookie value.
Source§fn query_parameters(&self, name: &str) -> Option<&[String]>
fn query_parameters(&self, name: &str) -> Option<&[String]>
Returns every decoded value for one query parameter.
Source§fn client_ip(&self) -> Option<IpAddr>
fn client_ip(&self) -> Option<IpAddr>
Returns the normalized client IP when trusted proxy processing supplied it.
Source§fn request_id(&self) -> Option<&MessageId>
fn request_id(&self) -> Option<&MessageId>
Returns the request identity generated or accepted by the application boundary.
Auto Trait Implementations§
impl !Freeze for HttpRequestParts
impl RefUnwindSafe for HttpRequestParts
impl Send for HttpRequestParts
impl Sync for HttpRequestParts
impl Unpin for HttpRequestParts
impl UnsafeUnpin for HttpRequestParts
impl UnwindSafe for HttpRequestParts
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