pub struct Notified {
pub deliveries: Vec<Delivery>,
}Expand description
The result of notifying one recipient over every declared channel.
Fields§
§deliveries: Vec<Delivery>Implementations§
Source§impl Notified
impl Notified
pub fn failures(&self) -> Vec<&Delivery>
pub fn delivered(&self, channel: &str) -> bool
Sourcepub fn payload(&self, channel: &str) -> Option<&Json>
pub fn payload(&self, channel: &str) -> Option<&Json>
The payload a channel produced, for the caller to store.
Sourcepub fn into_result(self) -> Result<Notified>
pub fn into_result(self) -> Result<Notified>
Collapse into a Result, naming every channel that failed.
Optional on purpose: a caller usually wants the mail to have gone out even though the webhook endpoint is down, and only then decides whether that is worth failing the request over.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Notified
impl !UnwindSafe for Notified
impl Freeze for Notified
impl Send for Notified
impl Sync for Notified
impl Unpin for Notified
impl UnsafeUnpin for Notified
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