pub struct Notifier { /* private fields */ }Expand description
The notification service of a daemon.
Implementations§
Source§impl Notifier
impl Notifier
Sourcepub fn new(
state: &Path,
secrets: Arc<Secrets>,
resolve: Resolve,
) -> Result<Notifier>
pub fn new( state: &Path, secrets: Arc<Secrets>, resolve: Resolve, ) -> Result<Notifier>
Open the notifier over a state directory. Nothing is sent until
Notifier::start.
Sourcepub fn start(&self, ctl: Controller)
pub fn start(&self, ctl: Controller)
Follow the controller’s events from the start of this run.
Sourcepub fn set_details(&self, d: Details)
pub fn set_details(&self, d: Details)
Where events’ details come from.
pub fn shutdown(&self)
pub fn settings(&self) -> Settings
pub fn set_settings(&self, s: Settings) -> Result<()>
pub fn get(&self, org: &OrgId, name: &str) -> Result<Channel>
pub fn create(&self, org: &OrgId, c: Channel) -> Result<Channel>
Sourcepub fn update(
&self,
org: &OrgId,
name: &str,
provider: Option<Provider>,
rules: Option<Vec<Rule>>,
enabled: Option<bool>,
) -> Result<Channel>
pub fn update( &self, org: &OrgId, name: &str, provider: Option<Provider>, rules: Option<Vec<Rule>>, enabled: Option<bool>, ) -> Result<Channel>
Replace a channel’s provider, rules or enabled flag (each optional).
pub fn delete(&self, org: &OrgId, name: &str) -> Result<()>
Sourcepub fn deliveries(&self, org: &OrgId, name: &str) -> Result<Vec<Delivery>>
pub fn deliveries(&self, org: &OrgId, name: &str) -> Result<Vec<Delivery>>
A channel’s recent deliveries, newest first.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Notifier
impl !UnwindSafe for Notifier
impl Freeze for Notifier
impl Send for Notifier
impl Sync for Notifier
impl Unpin for Notifier
impl UnsafeUnpin for Notifier
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