pub trait Sequencer:
Send
+ Sync
+ Debug {
// Required methods
fn next_sequence_number(&self) -> u16;
fn roll_over_count(&self) -> u64;
fn clone_to(&self) -> Box<dyn Sequencer>;
}Expand description
Sequencer generates sequential sequence numbers for building RTP packets
Required Methods§
Sourcefn next_sequence_number(&self) -> u16
fn next_sequence_number(&self) -> u16
Returns the next sequence number, wrapping at u16::MAX and counting the rollover.
Sourcefn roll_over_count(&self) -> u64
fn roll_over_count(&self) -> u64
How many times the sequence number has wrapped.
SRTP needs this: the rollover counter is part of the packet index it encrypts with.
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".