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§
Sourcefn session_error(&self) -> Option<(u32, String)>
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§
Sourcefn stream_error(&self) -> Option<u32>
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".