pub trait IUNNotificationSound: PNSObject {
// Provided methods
fn p_default_sound() -> UNNotificationSound { ... }
fn m_sound_named(name: UNNotificationSoundName) -> Self
where Self: Sized + FromId { ... }
fn p_default_critical_sound() -> UNNotificationSound { ... }
fn m_default_critical_sound_with_audio_volume(volume: c_float) -> Self
where Self: Sized + FromId { ... }
fn m_critical_sound_named(name: UNNotificationSoundName) -> Self
where Self: Sized + FromId { ... }
fn m_critical_sound_named_with_audio_volume(
name: UNNotificationSoundName,
volume: c_float,
) -> Self
where Self: Sized + FromId { ... }
fn p_default_ringtone_sound() -> UNNotificationSound { ... }
fn m_ringtone_sound_named(name: UNNotificationSoundName) -> Self
where Self: Sized + FromId { ... }
}
Expand description
A trait containing all the methods for UNNotificationSound
Provided Methods§
Sourcefn p_default_sound() -> UNNotificationSound
fn p_default_sound() -> UNNotificationSound
Returns an object representing the default sound for notifications.
Sourcefn m_sound_named(name: UNNotificationSoundName) -> Self
fn m_sound_named(name: UNNotificationSoundName) -> Self
Creates a sound object that represents a custom sound file.
Sourcefn p_default_critical_sound() -> UNNotificationSound
fn p_default_critical_sound() -> UNNotificationSound
The default sound used for critical alerts.
Sourcefn m_default_critical_sound_with_audio_volume(volume: c_float) -> Self
fn m_default_critical_sound_with_audio_volume(volume: c_float) -> Self
Creates a sound object that plays the default critical alert sound at the volume you specify.
Sourcefn m_critical_sound_named(name: UNNotificationSoundName) -> Self
fn m_critical_sound_named(name: UNNotificationSoundName) -> Self
Creates a custom sound object for critical alerts.
Sourcefn m_critical_sound_named_with_audio_volume(
name: UNNotificationSoundName,
volume: c_float,
) -> Self
fn m_critical_sound_named_with_audio_volume( name: UNNotificationSoundName, volume: c_float, ) -> Self
Creates a custom sound object for critical alerts with the volume you specify.
fn p_default_ringtone_sound() -> UNNotificationSound
fn m_ringtone_sound_named(name: UNNotificationSoundName) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.