pub enum RespondError {
Failed(StreamError),
Expired,
}Expand description
Why a bounded response never reached the peer.
The two are worth telling apart because they say different things about the peer and leave the stream in different states: a failed write is a stream that has already ended, while a lapsed deadline is a peer that is still there and simply will not read what it asked for.
Its Display and std::error::Error impls have no
caller in this tree and are kept anyway: they are what makes a public error
type usable at all – ? into a Box<dyn Error> or an anyhow::Error, and
a source() chain that reaches the StreamError underneath – and a
caller outside the crate has no other way to add them.
Variants§
Failed(StreamError)
The write failed: the peer reset or stopped the stream, or the connection ended under it.
Expired
The deadline lapsed with the response unwritten.
The stream has already been reset with H3_REQUEST_CANCELLED, so there is nothing left to send or finish on it.
Trait Implementations§
Source§impl Debug for RespondError
impl Debug for RespondError
Source§impl Display for RespondError
impl Display for RespondError
Source§impl Error for RespondError
impl Error for RespondError
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()