#[non_exhaustive]pub enum ErrorKind {
Protocol,
Transport,
Decode,
Other(String),
}Expand description
What sort of failure an Error event records.
An open vocabulary. SPEC.md’s Event 6 section names three kinds and says
others may be added without a format version bump, so a spelling this crate
does not know is kept verbatim in Other rather than
refused. That is the treatment Perspective
gets, and it is the rule SPEC.md points at for this key.
An enum and not a bare String because these three are the recorder’s own
classification of what it just saw, chosen at the point the event is built:
a misspelling is a value no reader can group by, and the compiler is the
only thing that catches it before the trace is written. The wire spellings
live in as_str alone, so a reader and a writer cannot
disagree about them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Protocol
The peer violated the protocol.
Transport
The QUIC or WebTransport layer failed.
Decode
Bytes that would not parse as any message this recorder knows.
Other(String)
A kind this version of the crate does not know, kept verbatim.