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§
Provided Methods§
Sourcefn ongoing(&self, _state: &CallState)
fn ongoing(&self, _state: &CallState)
Every change to the call, for the phone’s ongoing-call notification.
Sourcefn voice(&self, _call: Option<&VoiceShown<'_>>)
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".