#[non_exhaustive]pub enum SessionEvent {
Activated,
Deactivated,
Suspend,
Resume,
RouteChanged,
}Expand description
The phone’s audio session, as the app reports it (CallKit on iOS, Telecom or the app’s own
audio focus on Android), for AudioSession::event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Activated
The OS’s audio session is active (CallKit’s provider(_:didActivate:)): kessel-audio
opens the microphone and the speaker.
Deactivated
The session is no longer active (didDeactivate): I/O stops; the call goes on.
Suspend
An interruption began (a cellular call, hold, lost audio focus): I/O pauses; the call goes on and the far end hears a pause, not loss.
Resume
The interruption ended: I/O restarts.
RouteChanged
The OS audio route changed (speaker, earpiece, Bluetooth): kessel-audio re-reads the device and reopens it if its rate changed (always on Android).
Trait Implementations§
Source§impl Clone for SessionEvent
impl Clone for SessionEvent
impl Copy for SessionEvent
Source§impl Debug for SessionEvent
impl Debug for SessionEvent
impl Eq for SessionEvent
Source§impl Hash for SessionEvent
impl Hash for SessionEvent
Source§impl PartialEq for SessionEvent
impl PartialEq for SessionEvent
impl StructuralPartialEq for SessionEvent
Auto Trait Implementations§
impl Forget for SessionEvent
impl Freeze for SessionEvent
impl Move for SessionEvent
impl RefUnwindSafe for SessionEvent
impl Send for SessionEvent
impl Sync for SessionEvent
impl Unpin for SessionEvent
impl UnsafeUnpin for SessionEvent
impl UnwindSafe for SessionEvent
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CryptoSafe for T
impl<T> CryptoSafe for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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> ⓘ
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 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> ⓘ
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