Skip to main content

Error

Trait Error 

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

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

Error trait for WebTransport operations.

Implementations must be Send + Sync + ’static to cross async boundaries.

Required Methods§

Source

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

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

NOTE: Reasons are bytes on the wire, but are converted to String for convenience.

Provided Methods§

Source

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

Return 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§