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§
Sourcefn session_error(&self) -> Option<(u32, String)>
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§
Sourcefn close_kind(&self) -> CloseKind
fn close_kind(&self) -> CloseKind
The typed transport condition, independent of application close codes.
Sourcefn stream_error(&self) -> Option<u32>
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".