Struct jsonrpsee_ws_server::PendingSubscription
source · [−]pub struct PendingSubscription(_);
Expand description
Represent a pending subscription which waits until it’s either accepted or rejected.
This type implements Drop
for ease of use, e.g. when dropped in error short circuiting via map_err()?
.
Implementations
sourceimpl PendingSubscription
impl PendingSubscription
sourcepub fn reject(self, err: impl Into<ErrorObject<'static>>) -> bool
pub fn reject(self, err: impl Into<ErrorObject<'static>>) -> bool
Reject the subscription call from ErrorObject
.
sourcepub fn accept(self) -> Option<SubscriptionSink>
pub fn accept(self) -> Option<SubscriptionSink>
Attempt to accept the subscription and respond the subscription method call.
Fails if the connection was closed
Trait Implementations
sourceimpl Debug for PendingSubscription
impl Debug for PendingSubscription
Auto Trait Implementations
impl !RefUnwindSafe for PendingSubscription
impl Send for PendingSubscription
impl Sync for PendingSubscription
impl Unpin for PendingSubscription
impl !UnwindSafe for PendingSubscription
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more