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§
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>
Sourcefn alarm_states(&self) -> Result<Vec<AlarmState>, NotifyError>
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.
fn scheduled(&self) -> Result<Vec<Scheduled>, NotifyError>
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".