Struct juju::Hook[][src]

pub struct Hook {
    pub name: String,
    pub callback: fn() -> Result<(), String>,
}

Fields

The name of the hook to call

A function to call when Juju calls this hook

Failures

Your function passed in needs to return a String on error so that users will know what happened. Ideally this should also be logged with juju::log

Trait Implementations

impl Debug for Hook
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Hook
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl Send for Hook

impl Sync for Hook