MCPcopy Create free account
hub / github.com/GCWing/BitFun / send_system_notification

Function send_system_notification

src/apps/desktop/src/api/system_api.rs:651–662  ·  view source on GitHub ↗
(
    app: tauri::AppHandle,
    request: SendNotificationRequest,
)

Source from the content-addressed store, hash-verified

649/// Send an OS-level desktop notification (Windows toast / macOS notification center).
650#[tauri::command]
651pub async fn send_system_notification(
652 app: tauri::AppHandle,
653 request: SendNotificationRequest,
654) -> Result<(), String> {
655 use tauri_plugin_notification::NotificationExt;
656
657 let mut builder = app.notification().builder().title(&request.title);
658 if let Some(body) = &request.body {
659 builder = builder.body(body);
660 }
661 builder.show().map_err(|e| e.to_string())
662}
663
664#[cfg(test)]
665mod tests {

Callers

nothing calls this directly

Calls 3

titleMethod · 0.80
builderMethod · 0.80
showMethod · 0.45

Tested by

no test coverage detected