pub struct AeronArchiveError {
pub code: AeronArchiveErrorCode,
pub message: String,
}Expand description
A typed archive control-session error: the AeronArchiveErrorCode plus the full
message from the archive.
Fields§
§code: AeronArchiveErrorCode§message: StringImplementations§
Source§impl AeronArchiveError
impl AeronArchiveError
Sourcepub fn parse(message: &str) -> Self
pub fn parse(message: &str) -> Self
Parses the errorCode=N the C archive client embeds in the aeron_errmsg text of a
failed request (and so in AeronCError lastError messages), not in
poll_for_error_response payloads.
Falls back to AeronArchiveErrorCode::Generic when no code is present.
Sourcepub fn from_code(code: i32) -> Self
pub fn from_code(code: i32) -> Self
Builds the typed error at an aeron_archive_* FFI error site: reads the current
thread-local error. Server responses embed errorCode=N in aeron_errmsg();
local client failures store their negative code in aeron_errcode().
Unlike AeronCError::from_code, this does read and copy the error text,
preserving the archive’s response details. Archive control operations are
request/response calls, not hot-path loops, so the copy is acceptable there.
Trait Implementations§
Source§impl Clone for AeronArchiveError
impl Clone for AeronArchiveError
Source§fn clone(&self) -> AeronArchiveError
fn clone(&self) -> AeronArchiveError
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 AeronArchiveError
impl Debug for AeronArchiveError
Source§impl Display for AeronArchiveError
impl Display for AeronArchiveError
impl Eq for AeronArchiveError
Source§impl Error for AeronArchiveError
impl Error for AeronArchiveError
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 From<AeronArchiveError> for AeronCError
Lossy interop: archive control errors flatten into AeronCError so ? works in
mixed client/archive code paths. The original typed code is not preserved (the C
client error domain has no equivalent slot for it); use AeronArchiveError
directly at archive control sites to retain the typed code.
impl From<AeronArchiveError> for AeronCError
Lossy interop: archive control errors flatten into AeronCError so ? works in
mixed client/archive code paths. The original typed code is not preserved (the C
client error domain has no equivalent slot for it); use AeronArchiveError
directly at archive control sites to retain the typed code.
Source§fn from(err: AeronArchiveError) -> Self
fn from(err: AeronArchiveError) -> Self
Source§impl PartialEq for AeronArchiveError
impl PartialEq for AeronArchiveError
Source§fn eq(&self, other: &AeronArchiveError) -> bool
fn eq(&self, other: &AeronArchiveError) -> bool
self and other values to be equal, and is used by ==.