pub enum StreamError {
ConnectionFailed {
url: String,
reason: String,
},
Disconnected {
url: String,
},
ReconnectExhausted {
url: String,
attempts: u32,
},
ParseError {
exchange: String,
reason: String,
},
StaleFeed {
feed_id: String,
elapsed_ms: u64,
threshold_ms: u64,
},
BookReconstructionFailed {
symbol: String,
reason: String,
},
BookCrossed {
symbol: String,
bid: String,
ask: String,
},
Backpressure {
channel: String,
depth: usize,
capacity: usize,
},
UnknownExchange(String),
Io(String),
WebSocket(String),
}Variants§
ConnectionFailed
WebSocket connection failed.
Disconnected
WebSocket disconnected unexpectedly.
ReconnectExhausted
Reconnection attempts exhausted.
ParseError
Tick deserialization failed.
StaleFeed
Feed is stale — no data received within staleness threshold.
BookReconstructionFailed
Order book reconstruction failed.
BookCrossed
Order book is crossed (bid >= ask).
Backpressure
Backpressure: the downstream channel is full.
UnknownExchange(String)
Invalid exchange format.
Io(String)
I/O error.
WebSocket(String)
WebSocket protocol error.
Trait Implementations§
Source§impl Debug for StreamError
impl Debug for StreamError
Source§impl Display for StreamError
impl Display for StreamError
Source§impl Error for StreamError
impl Error for StreamError
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 StreamError
impl RefUnwindSafe for StreamError
impl Send for StreamError
impl Sync for StreamError
impl Unpin for StreamError
impl UnsafeUnpin for StreamError
impl UnwindSafe for StreamError
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