#[non_exhaustive]pub enum Error {
Show 29 variants
Transport(String),
Decode(DecodeError),
Version,
RequiredExtension,
UnexpectedStream,
BoundsExceeded(BoundsExceeded),
Duplicate,
Cancel,
Timeout,
Old,
App(u16),
NotFound,
Unroutable,
WrongSize,
ProtocolViolation,
Unauthorized,
UnexpectedMessage,
Unsupported,
Encode(EncodeError),
TooManyParameters,
InvalidRole,
UnknownAlpn(String),
Dropped,
Closed,
Lagged,
FrameTooLarge,
TimestampMismatch,
Evicted,
Remote(u32),
}Expand description
A list of possible errors that can occur during the session.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transport(String)
The underlying QUIC/WebTransport connection failed; carries the backend’s message.
Decode(DecodeError)
A message off the wire could not be parsed.
Version
Version negotiation failed, or the negotiated version lacks a requested feature (e.g. a FETCH against a version without fetch support). Mostly a connect-time error, but the feature-gap case can surface mid-session, so it can’t simply move to a connect-only error type.
RequiredExtension
A required extension was not present
UnexpectedStream
An unexpected stream type was received
BoundsExceeded(BoundsExceeded)
An integer was too large for the QUIC varint range.
Duplicate
A duplicate ID was used
Cancel
Nobody is reading any more, so the producer stopped. Not a failure.
Timeout
It took too long to open or transmit a stream.
Old
The group is older than the latest group and dropped.
App(u16)
An application-chosen close code. Bounded to u16 and offset past the library’s
reserved range (+ 64) on the wire by Self::to_code, so app codes never
collide with protocol ones.
The width asymmetry with Self::Remote is deliberate: App is a code this
side chooses to send, while Remote carries a raw code received off the wire
that didn’t map to a known variant, which can be any u32.
NotFound
The requested broadcast or track does not exist at the peer.
Unroutable
A broadcast was requested that is neither announced nor served by a dynamic router, so there is no route to it.
WrongSize
A frame’s payload length disagreed with its declared size.
ProtocolViolation
The peer broke a protocol rule; the session is unusable.
The peer’s token does not grant the requested path or operation.
UnexpectedMessage
A valid message arrived in a state where it is not allowed.
Unsupported
The peer asked for a feature this endpoint does not implement.
Encode(EncodeError)
A message could not be serialized for the negotiated version.
TooManyParameters
A message carried more parameters than this endpoint accepts.
InvalidRole
The peer acted against the Role it advertised at SETUP.
UnknownAlpn(String)
The peer offered an ALPN this endpoint doesn’t recognize, so no version could be negotiated. A connect-time error.
Dropped
The producer was dropped without finishing, so the content is incomplete.
Closed
The handle was already closed by this side.
Lagged
The reader fell behind the group’s byte budget: the frame it wanted was dropped
to keep the group under its size limit. Named from the consumer’s side (nothing is
“full”); distinct from Self::Evicted, which drops a whole group under the
pool’s memory pressure.
FrameTooLarge
A frame declared a payload size larger than the receiver accepts.
TimestampMismatch
A frame’s timestamp doesn’t match its track’s negotiated timescale: it’s missing on a timed track, present on an untimed track, or carries a different scale than the track advertised.
Evicted
The group was evicted from the cache under memory pressure (see
cache::Pool). Unlike Self::Old, the group was
still within the publisher’s window; it can be re-fetched.
Remote(u32)
A remote error received via a stream/session reset code.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()