#[non_exhaustive]pub enum StreamError {
Show 21 variants
Protocol {
kind: ProtocolErrorKind,
detail: String,
},
Handshake(String),
ConnectionClosed,
StreamNotFound {
app: String,
stream_id: String,
},
AppNotFound(String),
AppAlreadyRegistered(String),
Unauthorized(String),
StreamAlreadyPublishing {
app: String,
stream_id: String,
},
PublisherLimitReached {
limit: usize,
},
UnsupportedCodec(String),
Codec(String),
Transcode(String),
HwAccelUnavailable(String),
Pipeline(String),
Storage(String),
StorageNotFound(String),
Cluster(String),
NodeNotFound(String),
Config(String),
Io(Error),
Other(String),
}Expand description
The crate-wide error type returned by every fallible operation (see the
Result alias). #[non_exhaustive], so matching must
include a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Protocol
A wire-protocol failure, classified by ProtocolErrorKind.
Fields
kind: ProtocolErrorKindWhat kind of protocol failure occurred.
Handshake(String)
A protocol handshake did not complete successfully.
ConnectionClosed
The peer closed the connection before the operation finished.
StreamNotFound
No live stream matches the requested key in the given application.
AppNotFound(String)
No application is registered under this name.
AppAlreadyRegistered(String)
An application with this name is already registered.
Authorization denied for the attempted publish or play.
StreamAlreadyPublishing
A live publisher already holds this stream key.
PublisherLimitReached
The engine-wide concurrent-publisher cap was reached.
UnsupportedCodec(String)
The codec is recognized but not supported by this build.
Codec(String)
A codec parse/bitstream error.
Transcode(String)
A transcoding pipeline error.
A requested hardware-acceleration backend is unavailable.
Pipeline(String)
A generic media-pipeline error.
Storage(String)
A storage-backend operation failed.
StorageNotFound(String)
The requested object does not exist in the storage backend.
Cluster(String)
A cluster/federation operation failed.
NodeNotFound(String)
No cluster node matches the requested address.
Config(String)
A configuration value was missing or invalid.
Io(Error)
An underlying I/O error (auto-converted via ?).
Other(String)
Anything not covered by a more specific variant.
Implementations§
Source§impl StreamError
impl StreamError
Sourcepub fn protocol(msg: impl Into<String>) -> Self
pub fn protocol(msg: impl Into<String>) -> Self
A protocol error of unspecified ProtocolErrorKind::Other kind.
Sourcepub fn protocol_kind(kind: ProtocolErrorKind, msg: impl Into<String>) -> Self
pub fn protocol_kind(kind: ProtocolErrorKind, msg: impl Into<String>) -> Self
A protocol error classified with an explicit ProtocolErrorKind.
Trait Implementations§
Source§impl Debug for StreamError
impl Debug for StreamError
Source§impl Display for StreamError
impl Display for StreamError
Source§impl Error for StreamError
impl Error for StreamError
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()