pub struct EventTemplate {
pub name: String,
pub desc: String,
pub date_str: Option<String>,
pub wait_expr: Option<String>,
pub cron_str: Option<String>,
pub icon_name: Option<String>,
pub sound_path: Option<String>,
pub announce: bool,
pub test_sound: bool,
}Expand description
Structure describing a notification
Fields§
§name: StringTitle of the notification
desc: StringBody of the notification message
date_str: Option<String>§wait_expr: Option<String>Optional duration expression that states a time span from now to now + duration as the waiting time until the notification is issued.
§Example
5 min30 minutes20 seconds3 days
cron_str: Option<String>An optional cron pattern to store in the database for recurring events.
§Example
* */5 * * * *(Every 5 minutes)* 30 16 * * *(Every day at 16:30)
icon_name: Option<String>Optional filename without extension or path of a specific icon, the icon must be placed within a folder that is known to the notification daemon.
sound_path: Option<String>Optional full-path to sound file (.mp3, .mpg, etc.)
announce: boolDecide whether to announce the notification in advance when either date_str, wait_expr,
or cron_str are given, the announcement shows the content of the notification and might be
used to test if the EventTemplate works as expected.
When test_sound is true and the sound_path points to a valid file the sound is played
during the announcement.
test_sound: boolOnly works in combination with announce and sound_path, play the sound file during the
announcement to check in advance if it works.
Trait Implementations§
Source§impl Clone for EventTemplate
impl Clone for EventTemplate
Source§fn clone(&self) -> EventTemplate
fn clone(&self) -> EventTemplate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more