pub enum Error {
Device {
source: AnyError,
meta: Meta,
},
InvalidConfig {
reason: String,
meta: Meta,
},
NoEncoder {
codec: String,
meta: Meta,
},
NoDecoder {
codec: String,
meta: Meta,
},
Encoder {
source: AnyError,
meta: Meta,
},
Decoder {
source: AnyError,
meta: Meta,
},
UnknownRendition {
name: String,
offered: Vec<String>,
meta: Meta,
},
Catalog {
source: AnyError,
meta: Meta,
},
Broadcast {
source: AnyError,
meta: Meta,
},
Closed {
meta: Meta,
},
Io {
source: Error,
meta: Meta,
},
}Expand description
An error from the media crates.
moq-ext-sources, moq-ext-player and moq-ext-publisher all return this
one type, so an error passes from a source to a broadcast unchanged. A
watched status holds it as Arc<Error>, as in
SlotState::Failed.
Variants§
Device
A capture or playback device, or a media file, would not open or failed while running.
InvalidConfig
A configuration cannot be used as given.
NoEncoder
No encoder compiled into this build can produce the codec asked for.
NoDecoder
No decoder compiled into this build can read the codec.
Encoder
An encoder failed to open or to encode.
Decoder
A decoder failed to open or to decode.
UnknownRendition
The broadcast’s catalog has no video rendition of that name.
Fields
Catalog
The catalog could not be read or written.
Broadcast
The broadcast layer refused an operation or reset a track being read.
The error comes from moq-net and looks the same whatever transport
carries the broadcast. Failures of the transport itself, such as an
unreachable peer, belong to the transport’s own error, iroh_live_node::Error
for iroh.
Closed
The broadcast, source or player was closed, or the session under it.
Io
Reading or writing a file or pipe failed.
Implementations§
Source§impl Error
impl Error
Sourcepub fn invalid(reason: impl Into<String>) -> Self
pub fn invalid(reason: impl Into<String>) -> Self
Creates an Error::InvalidConfig with reason.
Sourcepub fn device(source: impl Error + Send + Sync + 'static) -> Self
pub fn device(source: impl Error + Send + Sync + 'static) -> Self
Creates an Error::Device from an upstream error.
Sourcepub fn device_msg(message: impl Display) -> Self
pub fn device_msg(message: impl Display) -> Self
Creates an Error::Device from a message.
Sourcepub fn encoder(source: impl Error + Send + Sync + 'static) -> Self
pub fn encoder(source: impl Error + Send + Sync + 'static) -> Self
Creates an Error::Encoder from an upstream error.
Sourcepub fn encoder_msg(message: impl Display) -> Self
pub fn encoder_msg(message: impl Display) -> Self
Creates an Error::Encoder from a message.
Sourcepub fn decoder(source: impl Error + Send + Sync + 'static) -> Self
pub fn decoder(source: impl Error + Send + Sync + 'static) -> Self
Creates an Error::Decoder from an upstream error.
Sourcepub fn decoder_msg(message: impl Display) -> Self
pub fn decoder_msg(message: impl Display) -> Self
Creates an Error::Decoder from a message.
Sourcepub fn catalog(source: impl Error + Send + Sync + 'static) -> Self
pub fn catalog(source: impl Error + Send + Sync + 'static) -> Self
Creates an Error::Catalog from an upstream error.
Sourcepub fn catalog_msg(message: impl Display) -> Self
pub fn catalog_msg(message: impl Display) -> Self
Creates an Error::Catalog from a message.
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()
Source§impl StackError for Error
impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Source§fn as_dyn(&self) -> &dyn StackError
fn as_dyn(&self) -> &dyn StackError
dyn StackError.