#[repr(C)]pub struct UNNotificationSound {
pub ptr: Id<Object>,
}
Expand description
The sound played upon delivery of a notification.
Fields§
§ptr: Id<Object>
The raw pointer to the Objective-C object.
Implementations§
Source§impl UNNotificationSound
impl UNNotificationSound
Sourcepub fn default_sound() -> UNNotificationSound
pub fn default_sound() -> UNNotificationSound
Returns an object representing the default sound for notifications.
Sourcepub fn sound_named(name: UNNotificationSoundName) -> Self
pub fn sound_named(name: UNNotificationSoundName) -> Self
Creates a sound object that represents a custom sound file.
Sourcepub fn default_critical_sound() -> UNNotificationSound
pub fn default_critical_sound() -> UNNotificationSound
The default sound used for critical alerts.
Sourcepub fn default_critical_sound_with_audio_volume(volume: c_float) -> Self
pub fn 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.
Sourcepub fn critical_sound_named(name: UNNotificationSoundName) -> Self
pub fn critical_sound_named(name: UNNotificationSoundName) -> Self
Creates a custom sound object for critical alerts.
Sourcepub fn critical_sound_named_with_audio_volume(
name: UNNotificationSoundName,
volume: c_float,
) -> Self
pub fn 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.
pub fn default_ringtone_sound() -> UNNotificationSound
pub fn ringtone_sound_named(name: UNNotificationSoundName) -> Self
Methods from Deref<Target = Object>§
Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Returns a reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.
Sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Returns a mutable reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.