pub enum AudioRouteReason {
NewDevice,
OldDeviceUnavailable,
CategoryChange,
Override,
WakeFromSleep,
NoSuitableRoute,
RouteConfigurationChange,
Unknown,
}Expand description
Why the audio route changed, in platform-neutral terms (AVAudioSession reasons; Android’s
device added/removed callbacks map to NewDevice / OldDeviceUnavailable).
Variants§
NewDevice
An audio device became available, such as plugged-in headphones; sent as new_device.
The audio device in use went away; sent as old_device_unavailable.
CategoryChange
The audio session category changed; sent as category_change.
Override
The app overrode the route, such as forcing the speaker; sent as override.
WakeFromSleep
The device woke from sleep; sent as wake_from_sleep.
NoSuitableRoute
No route suits the audio session category; sent as no_suitable_route.
RouteConfigurationChange
The configuration of the route’s ports changed; sent as route_configuration_change.
Unknown
The platform gives no reason; sent as unknown.
Trait Implementations§
Source§impl Clone for AudioRouteReason
impl Clone for AudioRouteReason
impl Copy for AudioRouteReason
Source§impl Debug for AudioRouteReason
impl Debug for AudioRouteReason
impl Eq for AudioRouteReason
Source§impl PartialEq for AudioRouteReason
impl PartialEq for AudioRouteReason
impl StructuralPartialEq for AudioRouteReason
Auto Trait Implementations§
impl Forget for AudioRouteReason
impl Freeze for AudioRouteReason
impl Move for AudioRouteReason
impl RefUnwindSafe for AudioRouteReason
impl Send for AudioRouteReason
impl Sync for AudioRouteReason
impl Unpin for AudioRouteReason
impl UnsafeUnpin for AudioRouteReason
impl UnwindSafe for AudioRouteReason
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