Trait IUNNotificationSound

Source
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§

Source

fn p_default_sound() -> UNNotificationSound

Returns an object representing the default sound for notifications.

Source

fn m_sound_named(name: UNNotificationSoundName) -> Self
where Self: Sized + FromId,

Creates a sound object that represents a custom sound file.

Source

fn p_default_critical_sound() -> UNNotificationSound

The default sound used for critical alerts.

Source

fn m_default_critical_sound_with_audio_volume(volume: c_float) -> Self
where Self: Sized + FromId,

Creates a sound object that plays the default critical alert sound at the volume you specify.

Source

fn m_critical_sound_named(name: UNNotificationSoundName) -> Self
where Self: Sized + FromId,

Creates a custom sound object for critical alerts.

Source

fn m_critical_sound_named_with_audio_volume( name: UNNotificationSoundName, volume: c_float, ) -> Self
where Self: Sized + FromId,

Creates a custom sound object for critical alerts with the volume you specify.

Source

fn p_default_ringtone_sound() -> UNNotificationSound

Source

fn m_ringtone_sound_named(name: UNNotificationSoundName) -> Self
where Self: Sized + FromId,

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.

Implementors§