pub enum Error {
Show 30 variants
InvalidEvent(String),
InvalidUrl(String),
RpcError(Error),
ResponseHandler(String),
Disconnect,
NotificationMethod,
WebSocketMessageType,
MissingNotificationHandler,
WebSocketError(WebSocketError),
Timeout,
ReceiverCtl,
NoDataInSuccessResponse,
NoDataInNotificationMessage,
NoDataInErrorResponse,
ErrorDeserializingServerMessageData(Error),
ErrorDeserializingResponseData,
StatusCode(u32),
RpcCall(ServerError),
BorshSerialize,
BorshDeserialize(String),
SerdeSerialize(String),
SerdeDeserialize(String),
BorshResponseDeserialize(String),
ChannelRecvError,
ChannelSendError,
Utf8Error(Utf8Error),
SerdeJSON(Error),
Task(TaskError),
ServerError(ServerError),
JsonServerError(JsonServerError),
}Expand description
Errors produced by the wRPC client.
Variants§
InvalidEvent(String)
A control event string could not be parsed into a known super::Ctl value.
InvalidUrl(String)
The supplied endpoint URL is malformed or unsupported.
RpcError(Error)
An error originating from the shared RPC error type.
ResponseHandler(String)
No pending response handler was registered for the given message id.
Disconnect
The WebSocket connection was disconnected.
NotificationMethod
A notification message did not include a method identifier.
WebSocketMessageType
The received WebSocket message type is incompatible with the active protocol.
MissingNotificationHandler
A notification was received but no notification handler is configured.
WebSocketError(WebSocketError)
Underlying WebSocket error
Timeout
RPC call timeout
ReceiverCtl
Unable to send shutdown message to receiver
NoDataInSuccessResponse
RPC call succeeded but no data was received in success response
NoDataInNotificationMessage
A notification message arrived without any payload data.
NoDataInErrorResponse
RPC call failed but no data was received in error response
ErrorDeserializingServerMessageData(Error)
Unable to deserialize response data
ErrorDeserializingResponseData
Unable to deserialize response data
StatusCode(u32)
Response produced an unknown status code
RpcCall(ServerError)
RPC call executed successfully but produced an error response
BorshSerialize
Unable to serialize borsh data
BorshDeserialize(String)
Unable to deserialize borsh data
SerdeSerialize(String)
Unable to serialize serde data
SerdeDeserialize(String)
Unable to deserialize serde data
BorshResponseDeserialize(String)
RPC call succeeded, but error occurred deserializing borsh response
ChannelRecvError
Failure receiving from an internal channel.
ChannelSendError
Failure sending to an internal channel.
Utf8Error(Utf8Error)
A byte sequence could not be interpreted as valid UTF-8.
SerdeJSON(Error)
An error from JSON serialization or deserialization.
Task(TaskError)
An error originating from the underlying async task subsystem.
ServerError(ServerError)
A server-side error returned over the Borsh protocol.
JsonServerError(JsonServerError)
A server-side error returned over the JSON protocol.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl Error for Error
impl Error for Error
Source§fn custom<T: Display>(msg: T) -> Error
fn custom<T: Display>(msg: T) -> Error
Source§fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Deserialize receives a type different from what it was
expecting. Read moreSource§fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Deserialize receives a value of the right type but that
is wrong for some other reason. Read moreSource§fn invalid_length(len: usize, exp: &dyn Expected) -> Self
fn invalid_length(len: usize, exp: &dyn Expected) -> Self
Source§fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
Deserialize enum type received a variant with an
unrecognized name.Source§fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
Deserialize struct type received a field with an
unrecognized name.Source§fn missing_field(field: &'static str) -> Self
fn missing_field(field: &'static str) -> Self
Deserialize struct type expected to receive a required
field with a particular name but that field was not present in the
input.Source§fn duplicate_field(field: &'static str) -> Self
fn duplicate_field(field: &'static str) -> Self
Deserialize struct type received more than one of the
same field.Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(source: WebSocketError) -> Self
fn from(source: WebSocketError) -> Self
Source§impl From<JsonServerError> for Error
impl From<JsonServerError> for Error
Source§fn from(err: JsonServerError) -> Self
fn from(err: JsonServerError) -> Self
Source§impl From<ServerError> for Error
impl From<ServerError> for Error
Source§fn from(err: ServerError) -> Self
fn from(err: ServerError) -> Self
Source§impl<T> From<TrySendError<T>> for Error
impl<T> From<TrySendError<T>> for Error
Source§fn from(_: TrySendError<T>) -> Self
fn from(_: TrySendError<T>) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.