pub struct NotificationOutcome { /* private fields */ }Expand description
Aggregate outcome of sending a notification to all configured sinks.
Returned by Agent::send_trap_detailed
and Agent::send_inform_detailed so
callers can observe partial success: which sinks succeeded and which failed
with their errors. Sinks that were skipped (e.g. v1 sinks for informs) are
not included.
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 all_succeeded(&self) -> bool
pub fn all_succeeded(&self) -> bool
true if every attempted sink succeeded (also true when no sinks
were attempted).
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more