Enum SubscriptionCloseResponse
pub enum SubscriptionCloseResponse {
None,
Notif(SubscriptionMessage),
NotifErr(SubscriptionError),
}Expand description
Represents what action that will sent when a subscription callback returns.
Variants§
None
No further message will be sent.
Notif(SubscriptionMessage)
Send a subscription notification.
The subscription notification has the following format:
{
"jsonrpc": "2.0",
"method": "<method>",
"params": {
"subscription": "<subscriptionID>",
"result": <your msg>
}
}
}NotifErr(SubscriptionError)
Send a subscription error notification
The error notification has the following format:
{
"jsonrpc": "2.0",
"method": "<method>",
"params": {
"subscription": "<subscriptionID>",
"error": <your msg>
}
}
}Trait Implementations§
§impl Debug for SubscriptionCloseResponse
impl Debug for SubscriptionCloseResponse
§impl IntoSubscriptionCloseResponse for SubscriptionCloseResponse
impl IntoSubscriptionCloseResponse for SubscriptionCloseResponse
§fn into_response(self) -> SubscriptionCloseResponse
fn into_response(self) -> SubscriptionCloseResponse
Convert something into a subscription response
Auto Trait Implementations§
impl Freeze for SubscriptionCloseResponse
impl RefUnwindSafe for SubscriptionCloseResponse
impl Send for SubscriptionCloseResponse
impl Sync for SubscriptionCloseResponse
impl Unpin for SubscriptionCloseResponse
impl UnsafeUnpin for SubscriptionCloseResponse
impl UnwindSafe for SubscriptionCloseResponse
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn 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>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
None: 0 bytesNotif: 24 bytesNotifErr: 24 bytes