Struct crypto::voice::VoiceSessionId
zaun_community_protocol::crypto::voice::VoiceSessionId · Struct
pub struct VoiceSessionId(…)One participation in a voice channel. A member draws a fresh one on every join, so KIDs and epochs never repeat across joins.
Methods
Section titled “Methods”random
Section titled “random”pub fn random() -> Result<Self, RngError>A fresh, non-zero session id.
Errors
Section titled “Errors”RngError when the CSPRNG fails.
from_bytes
Section titled “from_bytes”pub const fn from_bytes(bytes: [u8; 16]) -> SelfWraps raw bytes.
as_bytes
Section titled “as_bytes”pub const fn as_bytes(&self) -> &[u8; 16]The raw bytes.
to_b64
Section titled “to_b64”pub fn to_b64(&self) -> StringUnpadded base64url, like every other id.
from_b64
Section titled “from_b64”pub fn from_b64(text: &str) -> Result<Self, B64Error>Parses unpadded base64url.
Errors
Section titled “Errors”b64::B64Error for bad text or the wrong length.
Trait implementations
Section titled “Trait implementations”Clone, Copy, Debug, Deserialize<'de>, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize, StructuralPartialEq