pub struct RequestContext {
pub peer: AuthenticatedPeer,
pub ids: RequestIds,
pub routing: Option<RoutingHeaders>,
}Available on crate feature
server only.Expand description
The pieces of a request a handler is given.
Fields§
§peer: AuthenticatedPeerThe platform the request was authenticated as.
ids: RequestIdsThe request and correlation IDs, to be echoed on the response.
routing: Option<RoutingHeaders>The routing headers, when the module is a functional one and the peer sent them.
Implementations§
Source§impl RequestContext
impl RequestContext
Sourcepub fn response_routing(&self, responder: &PartyRef) -> Option<RoutingHeaders>
pub fn response_routing(&self, responder: &PartyRef) -> Option<RoutingHeaders>
The routing headers for the response to this request.
Direct response | Receiving platform provider to Requesting platform provider | Requesting-party | Receiving-party
Sourcepub fn addressed_to(&self) -> Option<&PartyRef>
pub fn addressed_to(&self) -> Option<&PartyRef>
The party the request was addressed to, if the peer said.
Sourcepub fn from_party(&self) -> Option<&PartyRef>
pub fn from_party(&self) -> Option<&PartyRef>
The party the request came from, if the peer said.
Trait Implementations§
Source§impl Clone for RequestContext
impl Clone for RequestContext
Source§fn clone(&self) -> RequestContext
fn clone(&self) -> RequestContext
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 RequestContext
impl RefUnwindSafe for RequestContext
impl Send for RequestContext
impl Sync for RequestContext
impl Unpin for RequestContext
impl UnsafeUnpin for RequestContext
impl UnwindSafe for RequestContext
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