pub struct SubscriptionError(/* private fields */);
Expand description
Error returned when a subscription fails where the error is returned as special error notification with the following format:
{"jsonrpc":"2.0", "method":"subscription_error", "params": {"subscription": "sub_id", "error": <error message from this type>}}
It’s recommended to use SubscriptionError::from_json
to create a new instance of this error
if the underlying error is a JSON value. That will ensure that the error is serialized correctly.
SubscriptionError::from will serialize the error as a string, which is not
recommended and should only by used in the value of a String
type.
It’s mainly provided for convenience and to allow for easy conversion any type that implements StdError.
Implementations§
Trait Implementations§
Source§impl Clone for SubscriptionError
impl Clone for SubscriptionError
Source§fn clone(&self) -> SubscriptionError
fn clone(&self) -> SubscriptionError
Returns a copy 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 moreSource§impl Debug for SubscriptionError
impl Debug for SubscriptionError
Source§impl<T: ToString> From<T> for SubscriptionError
impl<T: ToString> From<T> for SubscriptionError
Auto Trait Implementations§
impl Freeze for SubscriptionError
impl RefUnwindSafe for SubscriptionError
impl Send for SubscriptionError
impl Sync for SubscriptionError
impl Unpin for SubscriptionError
impl UnwindSafe for SubscriptionError
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