pub struct ResponseContext { /* private fields */ }Expand description
Request metadata retained while a handler converts its output into a response.
This keeps request-aware response features such as CSP nonces and named-route
manifests available even when the handler consumes the Request. Sensitive
request Header values are never retained.
Implementations§
Source§impl ResponseContext
impl ResponseContext
pub fn from_request(request: &Request) -> Self
pub const fn uri(&self) -> &Uri
pub const fn is_page_request(&self) -> bool
pub const fn csp_nonce(&self) -> Option<&CspNonce>
pub const fn route_manifest(&self) -> Option<&RouteManifest>
Trait Implementations§
Source§impl Clone for ResponseContext
impl Clone for ResponseContext
Source§fn clone(&self) -> ResponseContext
fn clone(&self) -> ResponseContext
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 moreAuto Trait Implementations§
impl !Freeze for ResponseContext
impl RefUnwindSafe for ResponseContext
impl Send for ResponseContext
impl Sync for ResponseContext
impl Unpin for ResponseContext
impl UnsafeUnpin for ResponseContext
impl UnwindSafe for ResponseContext
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