#[non_exhaustive]pub enum SrtpError {
KeyLength {
what: &'static str,
expected: usize,
actual: usize,
},
TooShort(usize),
NotAuthentic,
Replayed(u16),
ReplayedRtcp(u32),
}Expand description
What can go wrong protecting or unprotecting a packet.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
KeyLength
The key or salt was not the length the transform requires.
Fields
TooShort(usize)
Too short to be a packet of this kind at all.
NotAuthentic
The authentication tag did not match.
Deliberately says nothing about why. A caller that could tell “wrong key” from “altered packet” would be an oracle.
Replayed(u16)
The packet has been seen before, or is too old to judge (RFC 3711 §3.3.2).
ReplayedRtcp(u32)
The SRTCP packet has been seen before, or its 31-bit index is too old to judge.
Trait Implementations§
Source§impl Error for SrtpError
impl Error for SrtpError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl Eq for SrtpError
impl StructuralPartialEq for SrtpError
Auto Trait Implementations§
impl Freeze for SrtpError
impl RefUnwindSafe for SrtpError
impl Send for SrtpError
impl Sync for SrtpError
impl Unpin for SrtpError
impl UnsafeUnpin for SrtpError
impl UnwindSafe for SrtpError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more