#[non_exhaustive]pub enum Error {
App {
code: u64,
reason: String,
},
Transport {
code: u64,
reason: String,
},
TimedOut,
Reset(u64),
Stop(u64),
Tls(String),
Io(String),
Quic(String),
NotServer,
Web(String),
Http3 {
code: u64,
reason: String,
},
Qlog(String),
}Expand description
Why a connection could not be set up or has ended.
One error type for the whole module: it is also what every
web_transport_trait::poll operation on a Connection reports, which
is how the close reason reaches moq_net::Error::from_transport.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
App
The application (ours or the peer’s) closed the connection.
Fields
Transport
QUIC closed the connection with a transport-level code.
TimedOut
The connection idled out or the handshake never completed.
Reset(u64)
The peer reset the stream with this code.
Stop(u64)
The peer told us to stop sending with this code.
Tls(String)
The TLS material a connection needs could not be loaded.
Io(String)
The socket died underneath the connection.
Quic(String)
The QUIC stack refused an operation. The backend’s own message, since the two describe the same failures differently.
NotServer
Accepting needs the server configuration the endpoint was built without.
Web(String)
The WebTransport (HTTP/3) layer failed: a broken handshake, or a stream that could not be framed.
Http3
HTTP/3 failed with a code of its own, one that names no WebTransport
error (H3_NO_ERROR, say). Neither trait accessor reports it, because
it is not a code the peer’s application chose.
Fields
Qlog(String)
qlog traces were asked for and cannot be captured: the directory is missing or unwritable, or the writer thread could not be started.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()