pub struct WebSocketContext { /* private fields */ }Implementations§
Source§impl WebSocketContext
impl WebSocketContext
pub fn new( container: Container, request_id: Option<RequestId>, auth_identity: Option<AuthIdentity>, headers: HeaderMap, ) -> Self
pub fn container(&self) -> &Container
pub fn request_id(&self) -> Option<&RequestId>
pub fn auth_identity(&self) -> Option<&AuthIdentity>
pub fn headers(&self) -> &HeaderMap
pub fn resolve<T>(&self) -> Result<Arc<T>>
pub fn is_authenticated(&self) -> bool
pub fn has_role(&self, role: &str) -> bool
pub fn microservice_context( &self, pattern: impl Into<String>, metadata: TransportMetadata, ) -> MicroserviceContext
Trait Implementations§
Source§impl Clone for WebSocketContext
impl Clone for WebSocketContext
Source§fn clone(&self) -> WebSocketContext
fn clone(&self) -> WebSocketContext
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 WebSocketContext
impl RefUnwindSafe for WebSocketContext
impl Send for WebSocketContext
impl Sync for WebSocketContext
impl Unpin for WebSocketContext
impl UnsafeUnpin for WebSocketContext
impl UnwindSafe for WebSocketContext
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