#[non_exhaustive]pub enum StoreError {
StoreFailed {
seq_num: u64,
reason: String,
},
RetrieveFailed {
seq_num: u64,
reason: String,
},
NotFound {
seq_num: u64,
},
RangeNotAvailable {
begin: u64,
end: u64,
},
InvalidRange {
begin: u64,
end: u64,
},
Corrupted {
reason: String,
},
Io(String),
}Expand description
Errors in message store operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StoreFailed
Failed to store message.
RetrieveFailed
Failed to retrieve message.
NotFound
Message not found in store.
RangeNotAvailable
No message is available anywhere in the requested range.
The bounds are inclusive, which is how a FIX ResendRequest
expresses them. A half-open Range<u64> cannot represent an upper
bound of u64::MAX — the “to infinity” case a ResendRequest with
EndSeqNo (16) = 0 asks for — without an end + 1 that overflows, so
the bounds are carried as two numbers and no arithmetic is performed on
them.
Fields
InvalidRange
The requested range is inverted: begin is above end.
This is a caller error, not an empty result. It is reported rather than normalised because a store cannot tell an inverted range apart from a range that happens to hold nothing, and silently answering “empty” hides the bug that produced it.
Fields
Corrupted
Store is corrupted.
Io(String)
I/O error in persistent store.
Trait Implementations§
Source§impl Clone for StoreError
impl Clone for StoreError
Source§fn clone(&self) -> StoreError
fn clone(&self) -> StoreError
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 StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
impl Eq for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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()