pub struct FlushOutcome { /* private fields */ }Expand description
The typed result of a PushClient::flush or PushClient::close.
T1 «FLUSH-UNRESOLVED-DISCLOSURE» invariant: failures.is_empty() && unresolved == 0 is the ONLY shape that reads as proven-accepted (see
FlushOutcome::is_proven_accepted). Budget expiry with unresolved
publishes is a NORMAL outcome the caller must inspect, never an Err; the
outer Err is reserved for failures of the flush mechanism itself.
Implementations§
Source§impl FlushOutcome
impl FlushOutcome
Sourcepub fn failures(&self) -> &[PublishRejection]
pub fn failures(&self) -> &[PublishRejection]
Per-publish rejections among the flushed publishes, in wire order.
Sourcepub fn into_failures(self) -> Vec<PublishRejection>
pub fn into_failures(self) -> Vec<PublishRejection>
Consumes the outcome, returning the owned rejections in wire order.
Sourcepub const fn unresolved(&self) -> usize
pub const fn unresolved(&self) -> usize
Flushed publishes whose verdict never arrived inside the budget.
Sourcepub const fn mode(&self) -> FlushMode
pub const fn mode(&self) -> FlushMode
Whether the call half-closed the socket or only collected verdicts.
Sourcepub fn is_proven_accepted(&self) -> bool
pub fn is_proven_accepted(&self) -> bool
true ONLY when every flushed publish was proven accepted by the
server: no failures AND no unresolved publishes (the T1
«FLUSH-UNRESOLVED-DISCLOSURE» invariant). Any other shape is the
caller’s to inspect.
Trait Implementations§
Source§impl Clone for FlushOutcome
impl Clone for FlushOutcome
Source§fn clone(&self) -> FlushOutcome
fn clone(&self) -> FlushOutcome
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 FlushOutcome
impl Debug for FlushOutcome
impl Eq for FlushOutcome
Source§impl PartialEq for FlushOutcome
impl PartialEq for FlushOutcome
impl StructuralPartialEq for FlushOutcome
Auto Trait Implementations§
impl Freeze for FlushOutcome
impl RefUnwindSafe for FlushOutcome
impl Send for FlushOutcome
impl Sync for FlushOutcome
impl Unpin for FlushOutcome
impl UnsafeUnpin for FlushOutcome
impl UnwindSafe for FlushOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.