pub struct NotifyConfig {
pub on_close: Option<String>,
pub on_fail: Option<String>,
pub on_scheduled_complete: Option<String>,
}Expand description
Notification configuration for human-facing alerts.
Commands are shell templates run via sh -c with variable interpolation.
All are fire-and-forget — failures are logged but never block operations.
§Template variables
| Variable | Available in | Description |
|---|---|---|
{id} | all | Unit ID |
{title} | all | Unit title |
{status} | on_close, on_scheduled_complete | “pass” or “fail” |
{verify_output} | on_close | First 200 chars of verify output |
{attempt} | on_fail | Current attempt number |
{max_attempts} | on_fail | Max attempts configured |
{output} | on_fail | First 200 chars of verify output |
{schedule} | on_scheduled_complete | Schedule expression |
{next_run_at} | on_scheduled_complete | Next scheduled run time |
Fields§
§on_close: Option<String>Command run when a unit closes successfully.
on_fail: Option<String>Command run when a unit’s verify fails.
on_scheduled_complete: Option<String>Command run when a scheduled unit completes (pass or fail).
Trait Implementations§
Source§impl Clone for NotifyConfig
impl Clone for NotifyConfig
Source§fn clone(&self) -> NotifyConfig
fn clone(&self) -> NotifyConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NotifyConfig
impl Debug for NotifyConfig
Source§impl Default for NotifyConfig
impl Default for NotifyConfig
Source§fn default() -> NotifyConfig
fn default() -> NotifyConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NotifyConfig
impl<'de> Deserialize<'de> for NotifyConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for NotifyConfig
impl PartialEq for NotifyConfig
Source§impl Serialize for NotifyConfig
impl Serialize for NotifyConfig
impl StructuralPartialEq for NotifyConfig
Auto Trait Implementations§
impl Freeze for NotifyConfig
impl RefUnwindSafe for NotifyConfig
impl Send for NotifyConfig
impl Sync for NotifyConfig
impl Unpin for NotifyConfig
impl UnsafeUnpin for NotifyConfig
impl UnwindSafe for NotifyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more