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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AeronOfferError
impl Debug for AeronOfferError
Source§impl Display for AeronOfferError
impl Display for AeronOfferError
impl Eq for AeronOfferError
Source§impl Error for AeronOfferError
impl Error for AeronOfferError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for AeronOfferError
impl PartialEq for AeronOfferError
Source§fn eq(&self, other: &AeronOfferError) -> bool
fn eq(&self, other: &AeronOfferError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AeronOfferError
Auto Trait Implementations§
impl Freeze for AeronOfferError
impl RefUnwindSafe for AeronOfferError
impl Send for AeronOfferError
impl Sync for AeronOfferError
impl Unpin for AeronOfferError
impl UnsafeUnpin for AeronOfferError
impl UnwindSafe for AeronOfferError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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