#[non_exhaustive]pub enum SourceError {
Show 14 variants
Net(NetError),
Storage(StorageError),
InvalidPath(String),
PlaylistParse(String),
VariantNotFound(String),
SegmentNotFound(String),
KeyProcessing(String),
InvalidUrl(String),
Cancelled,
Timeout(String),
WaitBudgetExceeded,
FormatChangeNotApplicable,
Io(Error),
Other(Box<dyn StdError + Send + Sync>),
}Expand description
Unified source error, surfaced by every Source impl.
Concrete adapters (file, HLS, mocks) flatten their crate-local error
types into one of these variants at the Source impl boundary so that
Source itself stays object-safe (no associated Error type).
Adapter-specific failures that don’t map to a generic variant flow
through SourceError::Other, which boxes the original typed error
for downcast access.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Net(NetError)
Storage(StorageError)
InvalidPath(String)
PlaylistParse(String)
VariantNotFound(String)
SegmentNotFound(String)
KeyProcessing(String)
InvalidUrl(String)
Cancelled
Timeout(String)
WaitBudgetExceeded
Cooperative wait_range budget exceeded — caller passed
Some(timeout) and the source did not become ready within it.
Hot-path classifier for the audio worker’s retry loop; diagnostic
detail is intentionally absent so emission allocates nothing.
FormatChangeNotApplicable
format_change_segment_range not applicable in the current
state. Reasons (all expected steady states, not bugs):
- source has no init-bearing format-change concept (file
source — default
Sourcetrait impl returns this); - active HLS variant was activated by same-codec ABR with
served_from > 0: init bytes live at natural[0..init_size)while virtual space starts atbyte_shift, so init is unreachable via Stream reads. Same-codec post-switch playback continues throughbyte_shift; recovery via init probe is by design not applicable.
Callers must treat this as “no recovery possible at this site” (steady-state) — not an error to surface to the user.
Io(Error)
Other(Box<dyn StdError + Send + Sync>)
Implementations§
Trait Implementations§
Source§impl Debug for SourceError
impl Debug for SourceError
Source§impl Display for SourceError
impl Display for SourceError
Source§impl Error for SourceError
impl Error for SourceError
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()