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 error text (both
poll_for_error_response payloads and AeronCError lastError messages).
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 aeron_errmsg() text and parses the embedded errorCode=N out of
it (that is where the C archive client stores the real control-response code).
Unlike AeronCError::from_code, this does read and copy the error text —
it has to, the typed code only exists inside the message. 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 · 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
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
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.