Function mac_notification_sys::schedule_notification[][src]

pub fn schedule_notification(
    title: &str,
    subtitle: &Option<&str>,
    message: &str,
    sound: &Option<&str>,
    delivery_date: f64
) -> NotificationResult<()>

Schedules a new notification in the NotificationCenter

Returns a NotificationError if a notification could not be scheduled or is scheduled in the past


This example is not tested
extern crate chrono;
use chrono::offset::*;

// schedule a notification in 5 seconds
let _ = schedule_notification("Title", &None, "This is the body", &Some("Ping"),
                              Utc::now().timestamp() as f64 + 5.).unwrap();