pub struct TransportContext {
pub pattern: String,
pub kind: MessagePatternKind,
pub module_name: Option<String>,
/* private fields */
}Expand description
Context available to transport guards and interceptors.
Fields§
§pattern: String§kind: MessagePatternKind§module_name: Option<String>Implementations§
Source§impl TransportContext
impl TransportContext
pub fn execution_context(&self) -> &ExecutionContext
pub fn into_execution_context(self) -> ExecutionContext
Methods from Deref<Target = ExecutionContext>§
pub fn protocol(&self) -> ExecutionProtocol
pub fn websocket_context(&self) -> Option<&WebSocketExecutionContext>
pub fn transport_context(&self) -> Option<&TransportExecutionContext>
pub fn metadata_value(&self, key: &str) -> Option<&Value>
pub fn metadata_as<T>(&self, key: &str) -> Result<Option<T>>where
T: DeserializeOwned,
Trait Implementations§
Source§impl Clone for TransportContext
impl Clone for TransportContext
Source§fn clone(&self) -> TransportContext
fn clone(&self) -> TransportContext
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 TransportContext
impl Debug for TransportContext
Auto Trait Implementations§
impl Freeze for TransportContext
impl RefUnwindSafe for TransportContext
impl Send for TransportContext
impl Sync for TransportContext
impl Unpin for TransportContext
impl UnsafeUnpin for TransportContext
impl UnwindSafe for TransportContext
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