Enum Error
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§
§impl Error
impl Error
pub fn invalid(reason: impl Into<String>) -> Error
pub fn invalid(reason: impl Into<String>) -> Error
Creates an Error::InvalidConfig with reason.
pub fn device(source: impl Error + Send + Sync + 'static) -> Error
pub fn device(source: impl Error + Send + Sync + 'static) -> Error
Creates an Error::Device from an upstream error.
pub fn device_msg(message: impl Display) -> Error
pub fn device_msg(message: impl Display) -> Error
Creates an Error::Device from a message.
pub fn encoder(source: impl Error + Send + Sync + 'static) -> Error
pub fn encoder(source: impl Error + Send + Sync + 'static) -> Error
Creates an Error::Encoder from an upstream error.
pub fn encoder_msg(message: impl Display) -> Error
pub fn encoder_msg(message: impl Display) -> Error
Creates an Error::Encoder from a message.
pub fn decoder(source: impl Error + Send + Sync + 'static) -> Error
pub fn decoder(source: impl Error + Send + Sync + 'static) -> Error
Creates an Error::Decoder from an upstream error.
pub fn decoder_msg(message: impl Display) -> Error
pub fn decoder_msg(message: impl Display) -> Error
Creates an Error::Decoder from a message.
pub fn catalog(source: impl Error + Send + Sync + 'static) -> Error
pub fn catalog(source: impl Error + Send + Sync + 'static) -> Error
Creates an Error::Catalog from an upstream error.
pub fn catalog_msg(message: impl Display) -> Error
pub fn catalog_msg(message: impl Display) -> Error
Creates an Error::Catalog from a message.
Trait Implementations§
§impl Error for Error
impl Error for Error
§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()
§impl StackError for Error
impl StackError for Error
§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
§fn as_dyn(&self) -> &dyn StackError
fn as_dyn(&self) -> &dyn StackError
dyn StackError.