fn notify()

in native/desktop-linux/src/linux/notifications.rs [59:127]


    fn notify(
        &self,
        app_name: &str,
        replaces_id: u32,
        app_icon: &str,
        summary: &str,
        body: &str,
        actions: Vec<&str>,
        hints: HashMap<&str, Value<'_>>,
        expire_timeout: i32,
    ) -> zbus::Result<u32>;

    /// Causes a notification to be forcefully closed and removed from the user's view.
    /// It can be used, for example, in the event that what the notification pertains to
    /// is no longer relevant, or to cancel a notification with no expiration time.
    ///
    /// The `NotificationClosed` signal is emitted by this method.
    ///
    /// If the notification no longer exists, an empty D-BUS Error message is sent back.
    fn close_notification(&self, id: u32) -> zbus::Result<()>;

    /// A completed notification is one that has timed out, or has been dismissed by the user.
    ///
    /// # Arguments
    ///
    /// * `id` - The ID of the notification that was closed.
    /// * `reason` - The reason the notification was closed.
    ///              1 - The notification expired.
    ///              2 - The notification was dismissed by the user.
    ///              3 - The notification was closed by a call to `CloseNotification`.
    ///              4 - Undefined/reserved reasons.
    ///
    /// The ID specified in the signal is invalidated before the signal is sent and is
    /// no longer valid. Clients should remove any references to the ID.
    #[zbus(signal)]
    fn notification_closed(&self, id: u32, reason: u32) -> zbus::Result<()>;

    /// This signal is emitted when one of the following occurs:
    ///
    /// - The user performs some global "invoking" action upon a notification. For instance,
    ///   clicking somewhere on the notification itself.
    /// - The user invokes a specific action as specified in the original Notify request.
    ///   For instance, clicking on an action button.
    ///
    /// # Arguments
    ///
    /// * `id` - The ID of the notification emitting the `ActionInvoked` signal.
    /// * `action_key` - The key of the action invoked. These match the keys sent over
    ///                  in the list of actions.
    #[zbus(signal)]
    fn action_invoked(&self, id: u32, action_key: String) -> zbus::Result<()>;

    /// This signal can be emitted before the `ActionInvoked` signal. It carries
    /// an activation token that can be used to activate a toplevel.
    ///
    /// # Arguments
    ///
    /// * `id` - The ID of the notification emitting the `ActivationToken` signal.
    /// * `activation_token` - The activation token.
    #[zbus(signal)]
    fn activation_token(&self, id: u32, activation_token: String) -> zbus::Result<()>;
}

pub async fn show_notification_async(
    conn: &zbus::Connection,
    summary: &str,
    body: &str,
    sound_file_path: Option<String>,
) -> anyhow::Result<u32> {