Struct crypto::voice::Header
zaun_community_protocol::crypto::voice::Header · Struct
pub struct Header { … }An SFrame header (RFC 9605 the protocol).
Fields
Section titled “Fields”kid: u64
Section titled “kid: u64”The key id.
ctr: u64
Section titled “ctr: u64”The counter.
Methods
Section titled “Methods”encode_into
Section titled “encode_into”pub fn encode_into(&self, out: &mut Vec<u8>)Appends the minimal encoding.
to_bytes
Section titled “to_bytes”pub fn to_bytes(&self) -> Vec<u8>The minimal encoding.
pub fn parse(frame: &[u8]) -> Result<(Self, usize), VoiceError>Parses the header at the start of frame; returns it and its length. Non-minimal
encodings are rejected, so each header has exactly one encoding.
Errors
Section titled “Errors”VoiceError::Header.
Trait implementations
Section titled “Trait implementations”Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq