#[repr(u8)]pub enum PacketClass {
Core = 0,
Perceptual = 1,
Enhancement = 2,
Cosmetic = 3,
Repair = 4,
}Expand description
Packet class determines network and crypto behavior
Variants§
Core = 0
Core state: identity, presence, session, crypto Network: redundant, never dropped Crypto: strongest ratchet
Perceptual = 1
Perceptual state: voice, typing, live updates Network: predictive, loss tolerant Crypto: fast ratchet
Enhancement = 2
Enhancement state: HD layers, quality upgrades Network: opportunistic, drop first Crypto: standard ratchet
Cosmetic = 3
Cosmetic state: reactions, filters, UI hints Network: discardable Crypto: light ratchet
Repair = 4
Repair state: state summaries, resync Network: bursty, delayed OK Crypto: strong ratchet
Implementations§
Source§impl PacketClass
impl PacketClass
Sourcepub fn redundancy(self) -> u8
pub fn redundancy(self) -> u8
Get redundancy level (how many times to send)
Sourcepub fn is_droppable(self) -> bool
pub fn is_droppable(self) -> bool
Can this class be dropped under congestion?
Sourcepub fn ratchet_frequency(self) -> u32
pub fn ratchet_frequency(self) -> u32
Ratchet frequency (messages between ratchet advances)
Sourcepub fn replay_window_size(self) -> u16
pub fn replay_window_size(self) -> u16
Replay window size
Trait Implementations§
Source§impl Clone for PacketClass
impl Clone for PacketClass
Source§fn clone(&self) -> PacketClass
fn clone(&self) -> PacketClass
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PacketClass
impl Debug for PacketClass
Source§impl Default for PacketClass
impl Default for PacketClass
Source§fn default() -> PacketClass
fn default() -> PacketClass
Returns the “default value” for a type. Read more
Source§impl Hash for PacketClass
impl Hash for PacketClass
Source§impl PartialEq for PacketClass
impl PartialEq for PacketClass
impl Copy for PacketClass
impl Eq for PacketClass
impl StructuralPartialEq for PacketClass
Auto Trait Implementations§
impl Freeze for PacketClass
impl RefUnwindSafe for PacketClass
impl Send for PacketClass
impl Sync for PacketClass
impl Unpin for PacketClass
impl UnwindSafe for PacketClass
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