pub enum OrderBookError {
SequenceGap {
last: u64,
got: u64,
},
NoSnapshot,
SymbolMismatch {
tracker: String,
incoming: String,
},
InvalidDecimal {
value: f64,
},
}Expand description
Errors that can occur during orderbook reconstruction.
Variants§
SequenceGap
A delta arrived whose prev_update_id does not match the book’s last_update_id.
The book is now in an inconsistent state; the consumer should re-request a snapshot.
NoSnapshot
A delta was applied before any snapshot was loaded.
SymbolMismatch
The symbol on the snapshot or delta does not match the tracker’s symbol.
InvalidDecimal
A price or size value could not be converted to Decimal.
Trait Implementations§
Source§impl Debug for OrderBookError
impl Debug for OrderBookError
Source§impl Display for OrderBookError
impl Display for OrderBookError
Source§impl Error for OrderBookError
impl Error for OrderBookError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for OrderBookError
impl RefUnwindSafe for OrderBookError
impl Send for OrderBookError
impl Sync for OrderBookError
impl Unpin for OrderBookError
impl UnsafeUnpin for OrderBookError
impl UnwindSafe for OrderBookError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.