#[non_exhaustive]pub enum RtpmapError {
MissingEncoding,
MissingClockRate,
ClockRate(String),
EncodingParameter(String),
}Expand description
Why an a=rtpmap value names no format.
A value that names nothing is not an error the stack reports to anyone: both callers turn it into a non-match, which is the conservative reading of hostile input — a format sipx cannot identify is a format sipx does not agree to. The variants exist so the reason is available to a caller that wants to log it, and so a malformed clock rate is a typed outcome rather than a panic (AGENTS.md non-negotiable 3).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingEncoding
Nothing before the first /.
MissingClockRate
No / at all. RFC 8866 §6.6 makes the clock rate part of the format’s identity, so a
value without one identifies nothing.
ClockRate(String)
The clock rate is not a decimal number that fits in 32 bits.
EncodingParameter(String)
The encoding parameter is not a decimal number that fits in 32 bits. A value carrying more
fields than the grammar has arrives here, because the extra / is not a digit.
Trait Implementations§
Source§impl Clone for RtpmapError
impl Clone for RtpmapError
Source§fn clone(&self) -> RtpmapError
fn clone(&self) -> RtpmapError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RtpmapError
impl Debug for RtpmapError
Source§impl Display for RtpmapError
impl Display for RtpmapError
Source§impl Error for RtpmapError
impl Error for RtpmapError
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()
Source§impl PartialEq for RtpmapError
impl PartialEq for RtpmapError
Source§fn eq(&self, other: &RtpmapError) -> bool
fn eq(&self, other: &RtpmapError) -> bool
self and other values to be equal, and is used by ==.