feat: add notifaction builder

This commit is contained in:
2026-10-01 20:48:56 +02:00
parent 7966726534
commit 744efe8ec9
3 changed files with 87 additions and 1 deletions

View File

@@ -162,7 +162,7 @@ impl<'a> Notification {
/// `set_app_icon()`.
///
/// Available since: 0.8.4
pub fn set_app_icon(&mut self, app_icon: &str) -> Result<(), Box<dyn std::error::Error>> {
pub fn set_app_icon(&mut self, app_icon: &str) -> Result<(), std::ffi::NulError> {
let app_icon_c = std::ffi::CString::new(app_icon)?;
unsafe { notify_notification_set_app_icon(self.inner, app_icon_c.as_ptr()) };