#[non_exhaustive]pub enum Error {
Show 17 variants
Moq(Error),
Mux(Error),
ResourceRefused,
InvalidFileUrl,
ParsePlaylist(String),
NoVariants,
MissingMap,
EmptySegmentUri,
MissingByteRangeOffset {
url: Url,
},
InvalidByteRange {
url: Url,
start: u64,
length: u64,
},
ByteRangeLengthMismatch {
url: Url,
expected: u64,
actual: usize,
},
ByteRangeResponseMismatch {
url: Url,
start: u64,
end: u64,
},
SequenceOverflow {
kind: SequenceKind,
value: u64,
},
InvalidGeneration(String),
UrlParse(ParseError),
Reqwest(Arc<Error>),
Io(Arc<Error>),
}Expand description
Errors produced by the HLS <-> MoQ gateway (import and export).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Moq(Error)
Error from the underlying moq-net transport.
Mux(Error)
Error from the moq-mux CMAF import/export layer.
ResourceRefused
An import resource or redirect hop left the playlist’s origin, or the playlist uses an unsupported scheme.
InvalidFileUrl
A file:// URL could not be turned back into a filesystem path.
ParsePlaylist(String)
The fetched HLS playlist could not be parsed.
NoVariants
The master playlist contained no variant this gateway can import.
MissingMap
A media playlist had no EXT-X-MAP, so there is no CMAF init segment.
EmptySegmentUri
A media segment had an empty URI.
MissingByteRangeOffset
An implicit HLS byte range had no preceding range for the same resource.
InvalidByteRange
An HLS byte range was empty or overflowed its integer representation.
Fields
ByteRangeLengthMismatch
A ranged resource response had a different length than requested.
Fields
ByteRangeResponseMismatch
A partial HTTP response identified a different byte range than requested.
Fields
SequenceOverflow
An HLS media or discontinuity sequence was too large to pack into a MoQ group sequence.
InvalidGeneration(String)
An export generation had characters a URL path segment can’t carry verbatim.
UrlParse(ParseError)
A playlist or segment URI could not be resolved against its base.
Reqwest(Arc<Error>)
HTTP error while fetching a playlist or segment.
Io(Arc<Error>)
I/O error while reading a local playlist or segment.
Implementations§
Source§impl Error
impl Error
Sourcepub fn status(&self) -> Option<u16>
pub fn status(&self) -> Option<u16>
The HTTP status the origin answered with, if it answered with one at all.
The import loop consults it: a 503 on a playlist fetch is worth another pass, a 404 is
the origin’s settled answer. Nothing else here is classified; a failure with no status falls
through to the backoff budget.
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()