[][src]Struct essrpc::RPCError

pub struct RPCError {
    pub kind: RPCErrorKind,
    // some fields omitted
}

RPC error. All functions in RPC traits must return an error type which implements From<RPCError>.

Fields

kind: RPCErrorKind

Methods

impl RPCError[src]

pub fn new(
    kind: RPCErrorKind,
    msg: impl Into<String>
) -> Self
[src]

New error without a cause.

pub fn with_cause(
    kind: RPCErrorKind,
    msg: impl Into<String>,
    cause: impl Error
) -> Self
[src]

New error with a cause.

pub fn cause(&self) -> Option<&GenericSerializableError>[src]

Get the cause of the error (if any).

Trait Implementations

impl Display for RPCError[src]

impl Debug for RPCError[src]

impl Error for RPCError[src]

fn description(&self) -> &str
1.0.0
[src]

This method is soft-deprecated. Read more

fn cause(&self) -> Option<&dyn Error>
1.0.0
[src]

Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

The lower-level cause of this error, if any. Read more

fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0
[src]

The lower-level source of this error, if any. Read more

impl Serialize for RPCError[src]

impl<'de> Deserialize<'de> for RPCError[src]

Auto Trait Implementations

impl Send for RPCError

impl Sync for RPCError

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]