pub enum SourceError {
Transport,
Framing(FramingError),
}Expand description
Why the next inbound frame did not arrive.
Domain types only. An adapter maps its own io::Error into
Transport at the boundary, so nothing in application/
names a type from a runtime or from the operating system.
Variants§
Transport
The transport could not read.
Carries nothing, and that is the point. Every adapter has its own failures
— a broken pipe, a reset, a child that exited, an HTTP body that ended
early — and rendering any of them into a String an implementor controls
would put a peer’s bytes on the application layer’s error path for
nothing. A caller that needs to know which failure maps its own.
Framing(FramingError)
The bytes on the wire were not a frame.
A peer that will not terminate its line, or that sent something that is not text, is a fact about the peer rather than about the pipe, and it is worth distinguishing from a transport that simply failed.
Trait Implementations§
Source§impl Clone for SourceError
impl Clone for SourceError
Source§impl Debug for SourceError
impl Debug for SourceError
Source§impl Display for SourceError
impl Display for SourceError
impl Eq for SourceError
Source§impl Error for SourceError
impl Error for SourceError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()