pub struct NotificationOutcome { /* private fields */ }Available on crate feature
agent only.Expand description
Aggregate outcome of sending a notification to all configured sinks.
Returned by Agent::send_trap and
Agent::send_inform so callers can observe
success, failure, or an explicit skip for every configured sink.
Implementations§
Source§impl NotificationOutcome
impl NotificationOutcome
Sourcepub fn sinks(&self) -> &[SinkOutcome]
pub fn sinks(&self) -> &[SinkOutcome]
Per-sink outcomes, in sink configuration order.
Sourcepub fn failures(&self) -> impl Iterator<Item = &SinkOutcome>
pub fn failures(&self) -> impl Iterator<Item = &SinkOutcome>
Iterator over the sinks whose delivery failed.
Sourcepub fn skipped(&self) -> impl Iterator<Item = &SinkOutcome>
pub fn skipped(&self) -> impl Iterator<Item = &SinkOutcome>
Iterator over configured sinks that were not attempted.
Sourcepub fn all_succeeded(&self) -> bool
pub fn all_succeeded(&self) -> bool
true if every configured sink succeeded.
This is also true when no sinks are configured, but is false when
any configured sink failed or was skipped.
Sourcepub fn into_sinks(self) -> Vec<SinkOutcome>
pub fn into_sinks(self) -> Vec<SinkOutcome>
Consume the outcome, returning the per-sink outcomes.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NotificationOutcome
impl !UnwindSafe for NotificationOutcome
impl Freeze for NotificationOutcome
impl Send for NotificationOutcome
impl Sync for NotificationOutcome
impl Unpin for NotificationOutcome
impl UnsafeUnpin for NotificationOutcome
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