Struct fizyr_rpc::Error[][src]

pub struct Error { /* fields omitted */ }
Expand description

Opaque error for all RPC operations.

Implementations

Create a new error from an I/O error.

Create a new error for a message that is too short to be valid.

Create a new error for a message with an invalid message type in the header.

Create a new error for a message with an body that exceeds the allowed size.

Create a new error for an incoming message with an unexpected service ID.

Create a new error for an outgoing message body that could not be encoded.

Create a new error for an incoming message with a body that could not be decoded.

Create a new error for an incoming message that represent an error response from the remote peer.

A remote error does not indicate a communication or protocol violation. It is used when the remote peer correctly received and understood the request, but is unable to succesfully complete it.

Create a new error with a custom message.

Check if this error is caused by the remote peer closing the connection cleanly.

Check if an unexpected message type was received.

This can happen when you call recv_response() while an update message is still queued.

Check if this error represent an error response from the remote peer.

See Self::remote_error() for more details on what a remote error is.

Get this error as remote error message.

See Self::remote_error() for more details on what a remote error is.

Get this error as remote error message.

See Self::remote_error() for more details on what a remote error is.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

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

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

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.