Enum fizyr_rpc::RecvMessageError[][src]

pub enum RecvMessageError<Body> {
    Other(Error),
    UnknownStream(Message<Body>),
    UnknownRequest(ReceivedRequestHandle<Body>, Body),
    InvalidStream(MessageHeaderBox<dyn Error + Send>),
    InvalidRequest(ReceivedRequestHandle<Body>, Box<dyn Error + Send>),
}
Expand description

Error that can occur when receiving a message from a peer using a generated interface.

Apart from the [Error] reported by PeerHandle::recv_message(), this error is used when the received message has an unknown service ID or an invalid body.

Variants

Other(Error)

Tuple Fields

0: Error

The underlying call to PeerHandle::recv_message() returned an error.

UnknownStream(Message<Body>)

Tuple Fields

0: Message<Body>

The received stream message has an unknown service ID.

UnknownRequest(ReceivedRequestHandle<Body>, Body)

Tuple Fields

1: Body

The received request has an unknown service ID.

InvalidStream(MessageHeaderBox<dyn Error + Send>)

Tuple Fields

1: Box<dyn Error + Send>

The received stream message has a known service ID, but an invalid body.

The body has been consumed in the parse attempt, so only the message header and parse error are available.

InvalidRequest(ReceivedRequestHandle<Body>, Box<dyn Error + Send>)

Tuple Fields

1: Box<dyn Error + Send>

The received request has a known service ID, but an invalid body.

The body has been consumed in the parse attempt, so only the request handle and parse error are available.

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.

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.