pub enum ServerError {
JsonRpc(JsonRpcError),
Transport(TransportError),
Json(Error),
Io(Error),
Server {
code: ErrorCode,
message: String,
source: Option<Box<dyn StdError + Send + Sync>>,
},
}Expand description
Server-specific error type
Variants§
JsonRpc(JsonRpcError)
JSON-RPC protocol error
Transport(TransportError)
Transport error
Json(Error)
JSON serialization/deserialization error
Io(Error)
I/O error
Server
Server error with code and message
Implementations§
Trait Implementations§
Source§impl Debug for ServerError
impl Debug for ServerError
Source§impl Display for ServerError
impl Display for ServerError
Source§impl Error for ServerError
impl Error 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 From<JsonRpcError> for ServerError
impl From<JsonRpcError> for ServerError
Source§fn from(err: JsonRpcError) -> Self
fn from(err: JsonRpcError) -> Self
Convert a JSON-RPC error to a server error
Source§impl From<TransportError> for ServerError
impl From<TransportError> for ServerError
Source§fn from(err: TransportError) -> Self
fn from(err: TransportError) -> Self
Convert a transport error to a server error
Auto Trait Implementations§
impl !Freeze for ServerError
impl !RefUnwindSafe for ServerError
impl Send for ServerError
impl Sync for ServerError
impl Unpin 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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.