#[non_exhaustive]pub enum TokioError {
Http {
url: String,
source: Error,
},
Status {
url: String,
status: StatusCode,
},
Client(Error),
Auth(Error),
ByteRangeOverflow {
url: String,
offset: u64,
length: u64,
},
Stalled,
}tokio only.Expand description
Errors from the tokio IO adapter itself — distinct from
crate::client::Error, the sans-IO core’s own parse/demux error type
(wrapped here via
TokioError::Client).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Http
The underlying HTTP request failed outright (connect/timeout/TLS/
transport error) — never a non-2xx response, see Self::Status.
Status
The server returned a non-success HTTP status.
Client(Error)
The sans-IO core rejected the fetched playlist/resource — see
crate::client::Error for the underlying reason.
Auth(Error)
A 401’s WWW-Authenticate challenge could not be parsed, or no
Authorization response could be computed from it (e.g. an
unsupported Digest algorithm/qop) — see broadcast_auth::Error.
ByteRangeOverflow
Building the Range header for url would overflow u64
(offset + (length - 1), RFC 8216bis §4.4.4.9). In normal operation
this never fires: crate::client::HlsClient’s internal
resolve_byte_range already rejects any byte range whose
offset + length overflows before it ever reaches this adapter (see
crate::client::Error::ByteRangeOverflow) — this variant is
defense-in-depth against a future/foreign caller constructing a
(u64, u64) byte range directly, bypassing the sans-IO core.
Fields
Stalled
The sans-IO core had nothing queued to do and the stream had not ended.
In normal operation on_playlist always queues a reload (or a wait)
before returning, so this signals a core bug rather than a network
condition; it replaces a 10 ms defensive sleep that used to hide it.
Trait Implementations§
Source§impl Debug for TokioError
impl Debug for TokioError
Source§impl Display for TokioError
impl Display for TokioError
Source§impl Error for TokioError
impl Error for TokioError
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()