pub struct CallSession { /* private fields */ }Expand description
One device’s key state for one call.
Implementations§
Source§impl CallSession
impl CallSession
Sourcepub fn handle(&mut self, now: Millis, input: Input) -> Result<(), SessionError>
pub fn handle(&mut self, now: Millis, input: Input) -> Result<(), SessionError>
Applies one input. Never panics. A returned Err has already queued any recovery
output; state changes only on success of the MLS step it guards.
Sourcepub fn handle_timeout(&mut self, now: Millis)
pub fn handle_timeout(&mut self, now: Millis)
Runs every timer due at now.
Sourcepub fn poll_timeout(&self) -> Option<Millis>
pub fn poll_timeout(&self) -> Option<Millis>
The next time handle_timeout must run.
Sourcepub fn poll_output(&mut self) -> Option<Output>
pub fn poll_output(&mut self) -> Option<Output>
The next output, in order.
Sourcepub fn leave(&mut self, now: Millis)
pub fn leave(&mut self, now: Millis)
Teardown: Key(Clear), every secret zeroized, state Left{Left}. There is no key
message; the voice leave has the server remove the leaf.
Sourcepub fn stored_entries(&self) -> usize
pub fn stored_entries(&self) -> usize
Entries in this call’s MLS store (no contents; tests and telemetry: a long call’s store must not grow with its epochs).
Sourcepub fn footprint(&self) -> Vec<(&'static str, usize)>
pub fn footprint(&self) -> Vec<(&'static str, usize)>
Sizes of what the session holds (telemetry, no contents: a long soak tells a
growing structure from allocator noise): (name, entries) pairs, the MLS store’s bytes
as store_bytes.
Sourcepub fn stored_labels(&self) -> BTreeMap<String, usize>
pub fn stored_labels(&self) -> BTreeMap<String, usize>
The MLS store’s entries by storage label (telemetry).
Sourcepub fn state(&self) -> SessionState
pub fn state(&self) -> SessionState
The per-call state.
Sourcepub fn active_epoch(&self) -> Option<Epoch>
pub fn active_epoch(&self) -> Option<Epoch>
The active epoch.
Sourcepub fn local_slot(&self) -> Option<Slot>
pub fn local_slot(&self) -> Option<Slot>
The local send slot.
Sourcepub fn slot_base(&self) -> u8
pub fn slot_base(&self) -> u8
The slot base of the group held now (slot(e) = (slot_base + e) mod 64).
Sourcepub fn roster(&self) -> &[RosterEntry]
pub fn roster(&self) -> &[RosterEntry]
The roster, from the verified MLS tree only.
Sourcepub fn is_keyed(&self, id: &LkIdentity) -> bool
pub fn is_keyed(&self, id: &LkIdentity) -> bool
Whether id is in the key group now (a media participant with no leaf gets no key).
Sourcepub fn media_label(&self, id: &LkIdentity) -> MediaLabel
pub fn media_label(&self, id: &LkIdentity) -> MediaLabel
How the app labels a media participant.
Sourcepub fn security_code(&self) -> Option<SecurityCode>
pub fn security_code(&self) -> Option<SecurityCode>
The 30-digit code of the active epoch; None when the policy hides it.
Sourcepub fn status(&self) -> Option<&E2eeStatus>
pub fn status(&self) -> Option<&E2eeStatus>
The last status emitted.
Sourcepub fn lk_identity(&self) -> &LkIdentity
pub fn lk_identity(&self) -> &LkIdentity
The local engine identity.
Sourcepub fn key_ring(&self) -> &KeyRing
pub fn key_ring(&self) -> &KeyRing
The shadow of the keys this session emitted (what the bridge should hold).
Sourcepub fn identity_of_leaf(&self, leaf: u32) -> Option<&LkIdentity>
pub fn identity_of_leaf(&self, leaf: u32) -> Option<&LkIdentity>
The bound engine identity of a leaf.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CallSession
impl Forget for CallSession
impl Move for CallSession
impl RefUnwindSafe for CallSession
impl Send for CallSession
impl Sync for CallSession
impl Unpin for CallSession
impl UnsafeUnpin for CallSession
impl UnwindSafe for CallSession
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more