pub struct GuardAsWsMessageCheck { /* private fields */ }Expand description
Newtype adapter that lets any Guard satisfy the
WsMessageCheck interface — the bridge the
#[messages] macro uses to put guards in the per-event chain table
without nest-rs-ws depending on nest-rs-guards.
Implementations§
Trait Implementations§
Source§impl WsMessageCheck for GuardAsWsMessageCheck
impl WsMessageCheck for GuardAsWsMessageCheck
Source§fn check<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
client: &'life1 WsClient,
event: &'life2 str,
data: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn check<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
client: &'life1 WsClient,
event: &'life2 str,
data: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Returns the message a denied check sends back to the client.
Source§fn layer_name(&self) -> &'static str
fn layer_name(&self) -> &'static str
Display name for diagnostics.
Auto Trait Implementations§
impl !RefUnwindSafe for GuardAsWsMessageCheck
impl !UnwindSafe for GuardAsWsMessageCheck
impl Freeze for GuardAsWsMessageCheck
impl Send for GuardAsWsMessageCheck
impl Sync for GuardAsWsMessageCheck
impl Unpin for GuardAsWsMessageCheck
impl UnsafeUnpin for GuardAsWsMessageCheck
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> TowerCompatExt for T
impl<T> TowerCompatExt for T
Source§fn compat<ResBody, Err, Fut>(self) -> TowerCompatEndpoint<Self>where
ResBody: Body + Send + Sync + 'static,
<ResBody as Body>::Data: Into<Bytes> + Send + 'static,
<ResBody as Body>::Error: Error + Send + Sync + 'static,
Err: Into<Error>,
Self: Sized + Service<Request<BoxBody<Bytes, Error>>, Response = Response<ResBody>, Error = Err, Future = Fut> + Clone + Send + Sync + 'static,
Fut: Future<Output = Result<Response<ResBody>, Err>> + Send + 'static,
fn compat<ResBody, Err, Fut>(self) -> TowerCompatEndpoint<Self>where
ResBody: Body + Send + Sync + 'static,
<ResBody as Body>::Data: Into<Bytes> + Send + 'static,
<ResBody as Body>::Error: Error + Send + Sync + 'static,
Err: Into<Error>,
Self: Sized + Service<Request<BoxBody<Bytes, Error>>, Response = Response<ResBody>, Error = Err, Future = Fut> + Clone + Send + Sync + 'static,
Fut: Future<Output = Result<Response<ResBody>, Err>> + Send + 'static,
Converts a tower service to a poem endpoint.