pub struct AeronCError {
pub code: i32,
/* private fields */
}Expand description
Aeron C API error: code + optional message.
Construction is allocation-free (never reads aeron_errmsg()), so retry loops
that discard the error stay cheap. Attach the message via capture_errmsg()
(at the error site) or with_message(); Display / get_last_err_message()
otherwise read the live aeron_errmsg() buffer.
Fields§
§code: i32Implementations§
Source§impl AeronCError
impl AeronCError
Sourcepub fn from_code(code: i32) -> Self
pub fn from_code(code: i32) -> Self
Construct from an Aeron error code (< 0 is failure).
Allocation-free; does not read aeron_errmsg(). Use capture_errmsg() to
attach the message when the error will be stored or logged later.
Sourcepub fn with_message(code: i32, msg: impl Into<String>) -> Self
pub fn with_message(code: i32, msg: impl Into<String>) -> Self
Self::from_code with an attached message.
Sourcepub fn message(&self) -> Option<&str>
pub fn message(&self) -> Option<&str>
Message attached via capture_errmsg() / with_message(), if any.
pub fn kind(&self) -> AeronErrorType
pub fn is_back_pressured(&self) -> bool
pub fn is_admin_action(&self) -> bool
pub fn is_back_pressured_or_admin_action(&self) -> bool
Trait Implementations§
Source§impl Clone for AeronCError
impl Clone for AeronCError
Source§fn clone(&self) -> AeronCError
fn clone(&self) -> AeronCError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Eq for AeronCError
Source§impl From<AeronErrorType> for AeronCError
impl From<AeronErrorType> for AeronCError
Source§fn from(value: AeronErrorType) -> Self
fn from(value: AeronErrorType) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AeronCError
Equality is on code only — the attached message is advisory.
impl PartialEq for AeronCError
Equality is on code only — the attached message is advisory.
Auto Trait Implementations§
impl Freeze for AeronCError
impl RefUnwindSafe for AeronCError
impl Send for AeronCError
impl Sync for AeronCError
impl Unpin for AeronCError
impl UnsafeUnpin for AeronCError
impl UnwindSafe for AeronCError
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> 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>
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