pub struct Hooks { /* private fields */ }Expand description
Handle held by the platform. Cloneable so the writer thread’s copy costs nothing; the delivery thread lives as long as the process.
Implementations§
Source§impl Hooks
impl Hooks
Sourcepub fn start(config: PathBuf, log: PathBuf) -> Result<Self, String>
pub fn start(config: PathBuf, log: PathBuf) -> Result<Self, String>
Starts the delivery thread for the subscriptions in config,
writing delivery records to log.
§Errors
Returns a message when the subscription file cannot be read or does not parse. Fatal at startup by design: an operator who asked for webhooks and got a typo should be told now, not by silence later.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Hooks
impl RefUnwindSafe for Hooks
impl Send for Hooks
impl Sync for Hooks
impl Unpin for Hooks
impl UnsafeUnpin for Hooks
impl UnwindSafe for Hooks
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