#[non_exhaustive]pub struct NotifyOutcome {
pub sent: bool,
pub listeners_notified: usize,
}Expand description
Outcome of a Publisher send operation.
Returned by Publisher::send_copy, Publisher::loan_send, and
Publisher::loan. Inspect listeners_notified to detect dropped
notifications: a value smaller than the number of subscribers known to be
attached indicates that at least one listener’s kernel socket buffer was
full when the publisher tried to wake it. iceoryx2 will also log a
FailedToDeliverSignal warning per dropped delivery; this struct lets
callers detect the same condition programmatically without parsing logs.
Note that listeners_notified == 0 is not always a problem — it just
means no listeners were attached at the moment of notification (e.g.
no subscribers exist yet, which is normal during startup).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sent: booltrue if the message was published. For loan_send and loan, this
reflects the closure’s return value: false means the closure asked
to skip the send (no payload was sent and no notification fired).
listeners_notified: usizeNumber of listeners the notification was successfully delivered to.
Always 0 when sent == false. May be less than the expected listener
count under back-pressure — see the type-level docs.
Implementations§
Source§impl NotifyOutcome
impl NotifyOutcome
Sourcepub const fn delivered_to_any_listener(self) -> bool
pub const fn delivered_to_any_listener(self) -> bool
Convenience: true iff the message was sent AND at least one listener
was woken. Useful for asserting end-to-end pickup in tests.
Trait Implementations§
Source§impl Clone for NotifyOutcome
impl Clone for NotifyOutcome
Source§fn clone(&self) -> NotifyOutcome
fn clone(&self) -> NotifyOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NotifyOutcome
impl Debug for NotifyOutcome
Source§impl Hash for NotifyOutcome
impl Hash for NotifyOutcome
Source§impl PartialEq for NotifyOutcome
impl PartialEq for NotifyOutcome
Source§fn eq(&self, other: &NotifyOutcome) -> bool
fn eq(&self, other: &NotifyOutcome) -> bool
self and other values to be equal, and is used by ==.