pub struct ServerResponseContext { /* private fields */ }Expand description
Owned context available when observing an outbound server response.
Implementations§
Source§impl ServerResponseContext
impl ServerResponseContext
Sourcepub const fn new(
method: &'static MethodDescriptor,
request_id: Option<RequestId>,
connection_id: Option<ConnectionId>,
extensions: Extensions,
) -> Self
pub const fn new( method: &'static MethodDescriptor, request_id: Option<RequestId>, connection_id: Option<ConnectionId>, extensions: Extensions, ) -> Self
Create a response context from transport identifiers and shared extensions.
Sourcepub const fn method(&self) -> &'static MethodDescriptor
pub const fn method(&self) -> &'static MethodDescriptor
Static descriptor for the method being handled.
Sourcepub const fn request_id(&self) -> Option<RequestId>
pub const fn request_id(&self) -> Option<RequestId>
Wire-level request identifier for this call, when available.
Sourcepub const fn connection_id(&self) -> Option<ConnectionId>
pub const fn connection_id(&self) -> Option<ConnectionId>
Virtual connection identifier for this call, when available.
Sourcepub const fn extensions(&self) -> &Extensions
pub const fn extensions(&self) -> &Extensions
Per-request middleware extensions bag.
Trait Implementations§
Source§impl Clone for ServerResponseContext
impl Clone for ServerResponseContext
Source§fn clone(&self) -> ServerResponseContext
fn clone(&self) -> ServerResponseContext
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 ServerResponseContext
impl RefUnwindSafe for ServerResponseContext
impl Send for ServerResponseContext
impl Sync for ServerResponseContext
impl Unpin for ServerResponseContext
impl UnsafeUnpin for ServerResponseContext
impl UnwindSafe for ServerResponseContext
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