pub enum ServerError {
}Expand description
ServerError enum is used by both Server and Client and
represents errors returned by server-side handlers. This enum
is also serialized and transported to the client when using
the Borsh protocol (as such, this mostly contains pure enum
values).
Variants§
Close
The connection has been closed.
Timeout
The RPC call did not complete within the allotted time.
NoData
No data was available where data was expected.
NotFound
No handler was registered for the requested RPC method.
PoisonError
A lock was poisoned by a panic in another thread.
NonBorshRequest
The request was expected to use the Borsh protocol but did not.
NonSerdeRequest
The request was expected to use the serde/JSON protocol but did not.
ReqSerialize
The request could not be serialized.
ReqDeserialize
The request could not be deserialized.
RespSerialize
The response could not be serialized.
NotificationDeserialize(String)
A notification payload could not be deserialized.
RespDeserialize(String)
A response payload could not be deserialized.
Data(Vec<u8>)
Opaque binary error payload.
Text(String)
Free-form textual error message.
WebSocketError(String)
Underlying WebSocket error
ReceiveChannelRx
Failure receiving from an internal receiver channel.
ReceiveChannelTx
Failure sending to an internal receiver channel.
Trait Implementations§
Source§impl BorshDeserialize for ServerError
impl BorshDeserialize for ServerError
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for ServerError
impl BorshSerialize for ServerError
Source§impl Clone for ServerError
impl Clone for ServerError
Source§fn clone(&self) -> ServerError
fn clone(&self) -> ServerError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerError
impl Debug for ServerError
Source§impl<'de> Deserialize<'de> for ServerError
impl<'de> Deserialize<'de> for ServerError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ServerError
impl Display for ServerError
Source§impl EnumExt for ServerError
impl EnumExt for ServerError
impl Eq for ServerError
Source§impl Error for ServerError
impl Error for ServerError
1.30.0 · 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 From<&str> for ServerError
impl From<&str> for ServerError
Source§impl From<Error> for ServerError
impl From<Error> for ServerError
Source§impl From<Error> for ServerError
impl From<Error> for ServerError
Source§impl<T> From<PoisonError<T>> for ServerError
impl<T> From<PoisonError<T>> for ServerError
Source§fn from(_error: PoisonError<T>) -> ServerError
fn from(_error: PoisonError<T>) -> ServerError
Source§impl From<RecvError> for ServerError
impl From<RecvError> for ServerError
Source§fn from(_: RecvError) -> ServerError
fn from(_: RecvError) -> ServerError
Source§impl<T> From<SendError<T>> for ServerError
impl<T> From<SendError<T>> for ServerError
Source§fn from(_error: SendError<T>) -> ServerError
fn from(_error: SendError<T>) -> ServerError
Source§impl From<ServerError> for Error
impl From<ServerError> for Error
Source§fn from(err: ServerError) -> Self
fn from(err: ServerError) -> Self
Source§impl From<ServerError> for JsonServerError
impl From<ServerError> for JsonServerError
Source§fn from(err: ServerError) -> Self
fn from(err: ServerError) -> Self
Source§impl From<String> for ServerError
impl From<String> for ServerError
Source§impl<T> From<TrySendError<T>> for ServerError
impl<T> From<TrySendError<T>> for ServerError
Source§fn from(_error: TrySendError<T>) -> ServerError
fn from(_error: TrySendError<T>) -> ServerError
Source§impl PartialEq for ServerError
impl PartialEq for ServerError
Source§fn eq(&self, other: &ServerError) -> bool
fn eq(&self, other: &ServerError) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ServerError
impl Serialize for ServerError
impl StructuralPartialEq for ServerError
Auto Trait Implementations§
impl Freeze for ServerError
impl RefUnwindSafe for ServerError
impl Send for ServerError
impl Sync for ServerError
impl Unpin for ServerError
impl UnsafeUnpin for ServerError
impl UnwindSafe for ServerError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.