Skip to main content

Ringer

Trait Ringer 

Source
pub trait Ringer: Send + Sync {
    // Required methods
    fn ring(
        &self,
        call_id: &str,
        peer: &str,
        name: &str,
        avatar: Option<&str>,
        video: bool,
    );
    fn over(&self, call_id: &str, missed: bool);

    // Provided methods
    fn ongoing(&self, _state: &CallState) { ... }
    fn voice(&self, _call: Option<&VoiceShown<'_>>) { ... }
}
Expand description

A phone’s own call surfaces: the ring where the app’s window can’t show one (the lock screen), and the notification of a call under way. Installed once per process, so it rings even in one that runs no call engine (a phone’s background service).

Required Methods§

Source

fn ring( &self, call_id: &str, peer: &str, name: &str, avatar: Option<&str>, video: bool, )

name and avatar are the caller’s, as this account knows them.

Source

fn over(&self, call_id: &str, missed: bool)

The ring stopped: taken up here, or missed.

Provided Methods§

Source

fn ongoing(&self, _state: &CallState)

Every change to the call, for the phone’s ongoing-call notification.

Source

fn voice(&self, _call: Option<&VoiceShown<'_>>)

The voice Channel’s call, for the same notification; None once left.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§