Skip to main content

Notifier

Trait Notifier 

Source
pub trait Notifier: Send + Sync {
    // Required methods
    fn show(&self, notification: &Notification) -> Result<(), NotifyError>;
    fn withdraw(&self, tag: &str) -> Result<(), NotifyError>;

    // Provided methods
    fn schedule(
        &self,
        notification: &Notification,
        at: SystemTime,
    ) -> Result<(), NotifyError> { ... }
    fn schedule_alarm(
        &self,
        notification: &Notification,
        at: SystemTime,
        schedule: AlarmSchedule,
    ) -> Result<(), NotifyError> { ... }
    fn alarm_states(&self) -> Result<Vec<AlarmState>, NotifyError> { ... }
    fn scheduled(&self) -> Result<Vec<Scheduled>, NotifyError> { ... }
    fn cancel_scheduled(&self, tag: &str) -> Result<(), NotifyError> { ... }
}

Required Methods§

Source

fn show(&self, notification: &Notification) -> Result<(), NotifyError>

Source

fn withdraw(&self, tag: &str) -> Result<(), NotifyError>

Provided Methods§

Source

fn schedule( &self, notification: &Notification, at: SystemTime, ) -> Result<(), NotifyError>

Source

fn schedule_alarm( &self, notification: &Notification, at: SystemTime, schedule: AlarmSchedule, ) -> Result<(), NotifyError>

Source

fn alarm_states(&self) -> Result<Vec<AlarmState>, NotifyError>

Calendar handoffs and delivered occurrences owned by this app; a host that keeps only an absolute deadline returns none.

Source

fn scheduled(&self) -> Result<Vec<Scheduled>, NotifyError>

Source

fn cancel_scheduled(&self, tag: &str) -> Result<(), NotifyError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§