pub struct NotifyOptions {
pub sticky: bool,
pub priority: i8,
pub icon: Option<Resource>,
}Expand description
Options for sending notifications
Allows customization of notification behavior and appearance.
§Example
let icon = Resource::from_file("icon.png")?;
let options = NotifyOptions::new()
.with_sticky(true)
.with_priority(2)
.with_icon(icon);Fields§
§sticky: boolKeep notification on screen until dismissed
priority: i8Priority level (-2 = very low, 0 = normal, 2 = emergency)
icon: Option<Resource>Optional icon for this specific notification
Implementations§
Source§impl NotifyOptions
impl NotifyOptions
Sourcepub fn with_sticky(self, sticky: bool) -> Self
pub fn with_sticky(self, sticky: bool) -> Self
Set sticky mode (notification stays until dismissed)
Sourcepub fn with_priority(self, priority: i8) -> Self
pub fn with_priority(self, priority: i8) -> Self
Set priority (-2 to 2)
-2= Very Low-1= Moderate0= Normal (default)1= High2= Emergency
Trait Implementations§
Source§impl Default for NotifyOptions
impl Default for NotifyOptions
Source§fn default() -> NotifyOptions
fn default() -> NotifyOptions
Returns the “default value” for a type. Read more