Skip to main content

CallSession

Struct CallSession 

Source
pub struct CallSession { /* private fields */ }
Expand description

One device’s key state for one call.

Implementations§

Source§

impl CallSession

Source

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.

Source

pub fn handle_timeout(&mut self, now: Millis)

Runs every timer due at now.

Source

pub fn poll_timeout(&self) -> Option<Millis>

The next time handle_timeout must run.

Source

pub fn poll_output(&mut self) -> Option<Output>

The next output, in order.

Source

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.

Source

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).

Source

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.

Source

pub fn stored_labels(&self) -> BTreeMap<String, usize>

The MLS store’s entries by storage label (telemetry).

Source

pub fn state(&self) -> SessionState

The per-call state.

Source

pub fn active_epoch(&self) -> Option<Epoch>

The active epoch.

Source

pub fn local_slot(&self) -> Option<Slot>

The local send slot.

Source

pub fn mls_epoch(&self) -> Option<Epoch>

The MLS epoch of the group held now.

Source

pub fn slot_base(&self) -> u8

The slot base of the group held now (slot(e) = (slot_base + e) mod 64).

Source

pub fn group_id(&self) -> Option<Vec<u8>>

The group held now.

Source

pub fn own_leaf(&self) -> Option<u32>

The own leaf index in the group held now.

Source

pub fn roster(&self) -> &[RosterEntry]

The roster, from the verified MLS tree only.

Source

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).

Source

pub fn media_label(&self, id: &LkIdentity) -> MediaLabel

How the app labels a media participant.

Source

pub fn security_code(&self) -> Option<SecurityCode>

The 30-digit code of the active epoch; None when the policy hides it.

Source

pub fn telemetry(&self) -> &Counters

Ids and counts only.

Source

pub fn status(&self) -> Option<&E2eeStatus>

The last status emitted.

Source

pub fn lk_identity(&self) -> &LkIdentity

The local engine identity.

Source

pub fn join_id(&self) -> &JoinId

The Sew-minted join id.

Source

pub fn call_id(&self) -> &RoomName

The call.

Source

pub fn key_ring(&self) -> &KeyRing

The shadow of the keys this session emitted (what the bridge should hold).

Source

pub fn identity_of_leaf(&self, leaf: u32) -> Option<&LkIdentity>

The bound engine identity of a leaf.

Trait Implementations§

Source§

impl Debug for CallSession

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more