Struct juju::Hook
[−]
[src]
pub struct Hook { pub name: String, pub callback: Box<Fn() -> Result<(), String>>, }
Fields
name: String
The name of the hook to call
callback: Box<Fn() -> Result<(), String>>
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