pub struct TstrCommands { /* private fields */ }Expand description
Command sequence numbers for TSTR (RFC 5104 section 4.3.2.1: “The sequence number space is unique for each pairing of the SSRC of command source and the SSRC of the command target. The sequence number SHALL be increased by 1 modulo 256 for each new command. A repetition SHALL NOT increase the sequence number”).
use rtci_interceptor::TstrCommands;
let mut commands = TstrCommands::new();
let first = commands.request(0x1111, 0x2222, 31);
let again = commands.repeat(0x1111, 0x2222).expect("sent before");
let next = commands.request(0x1111, 0x2222, 0);
assert_eq!(first.entries[0].sequence_number, again.entries[0].sequence_number);
assert_eq!(
first.entries[0].sequence_number.wrapping_add(1),
next.entries[0].sequence_number
);Implementations§
Source§impl TstrCommands
impl TstrCommands
Trait Implementations§
Source§impl Clone for TstrCommands
impl Clone for TstrCommands
Source§impl Debug for TstrCommands
impl Debug for TstrCommands
Auto Trait Implementations§
impl Forget for TstrCommands
impl Freeze for TstrCommands
impl Move for TstrCommands
impl RefUnwindSafe for TstrCommands
impl Send for TstrCommands
impl Sync for TstrCommands
impl Unpin for TstrCommands
impl UnsafeUnpin for TstrCommands
impl UnwindSafe for TstrCommands
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