#[non_exhaustive]pub enum Error {
HeadTooShort,
InvalidSignature,
UnsupportedVersion(u8),
UnsupportedChannelCount(u32),
MappingTableTooShort,
InvalidMappingTable,
UnsupportedMappingFamily(u8),
}Expand description
Opus parsing errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
HeadTooShort
The OpusHead packet was shorter than the 19-byte minimum (RFC 7845 §5.1).
InvalidSignature
The packet did not start with the OpusHead magic signature.
UnsupportedVersion(u8)
The OpusHead major version (the upper four bits) is not one this parser understands, so none of its fields can be trusted (RFC 7845 §5.1).
UnsupportedChannelCount(u32)
The channel count is zero, or more than the channel mapping family allows: family 0 covers mono/stereo and family 1 up to eight channels.
MappingTableTooShort
A nonzero channel mapping family without its complete mapping table.
InvalidMappingTable
The channel mapping table names no streams, more coupled streams than streams, or a channel index past the decoded streams.
UnsupportedMappingFamily(u8)
A channel mapping family the operation cannot carry: family 0 given to
Mapping::new, which has no table; a Config::encode whose
mapping_family is not its mapping’s; or a container with no room for
the table.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()