pub enum SubscriptionCloseResponse {
None,
Notif(SubscriptionMessage),
NotifErr(SubscriptionMessage),
}
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(SubscriptionMessage)
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§
source§impl Debug for SubscriptionCloseResponse
impl Debug for SubscriptionCloseResponse
source§impl IntoSubscriptionCloseResponse for SubscriptionCloseResponse
impl IntoSubscriptionCloseResponse for SubscriptionCloseResponse
source§fn into_response(self) -> Self
fn into_response(self) -> Self
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 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