Skip to main content

Error

Trait Error 

Source
pub trait Error:
    Error
    + Send
    + Sync
    + 'static {
    // Required method
    fn session_error(&self) -> Option<(u32, String)>;

    // Provided methods
    fn close_kind(&self) -> CloseKind { ... }
    fn stream_error(&self) -> Option<u32> { ... }
}
Expand description

A transport failure with optional session and stream application codes.

Session codes and stream codes belong to separate registries.

Required Methods§

Source

fn session_error(&self) -> Option<(u32, String)>

Returns the error code and reason if this was an application error.

Close reasons are exposed as UTF-8 strings at the transport boundary.

Provided Methods§

Source

fn close_kind(&self) -> CloseKind

The typed transport condition, independent of application close codes.

Source

fn stream_error(&self) -> Option<u32>

Returns the error code if this was a stream error.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Error for moq_net::Error

Source§

impl Error for moq_net::transport::memory::Error