pub enum AeronOfferError {
NotConnected,
BackPressured,
AdminAction,
Closed,
MaxPositionExceeded,
TooManyParts,
Error(AeronCError),
}Expand description
Typed error for offer / try_claim on a publication.
Aeron returns a negative sentinel instead of a stream position. These are not
errno-style codes — -1 here means “not connected”, not a generic error — hence
this dedicated type. Use Self::is_retryable to drive retry loops.
Variants§
NotConnected
No subscriber is connected (-1). Usually transient: a subscriber may
connect later. Retryable.
BackPressured
Flow control or a full term buffer is applying back pressure (-2).
Retry after idling. Retryable.
AdminAction
An administrative action (e.g. term rotation) is in progress (-3).
Retry immediately. Retryable.
Closed
The publication is closed (-4). Fatal for this handle.
MaxPositionExceeded
The maximum stream position was reached (-5). Fatal: a new publication
(new session) is required.
TooManyParts
More than MAX_OFFER_PARTS buffers passed to offer_parts — a caller
bug, not an Aeron wire error. Fatal (fix the call site).
Error(AeronCError)
Any other negative value (-6 / unexpected). Fatal; inspect the inner
AeronCError and Aeron::errmsg() for detail.
Implementations§
Source§impl AeronOfferError
impl AeronOfferError
Sourcepub fn from_position(position: i64) -> Result<i64, Self>
pub fn from_position(position: i64) -> Result<i64, Self>
Maps a raw offer/try_claim return to Ok(position) or a typed error.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
A retry (possibly after idling / waiting for a subscriber) can succeed.
Trait Implementations§
Source§impl Clone for AeronOfferError
impl Clone for AeronOfferError
Source§fn clone(&self) -> AeronOfferError
fn clone(&self) -> AeronOfferError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more