pub enum StreamError {
Show 17 variants
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),
RingBufferFull {
capacity: usize,
},
RingBufferEmpty,
AggregationError {
reason: String,
},
NormalizationError {
reason: String,
},
InvalidTick {
reason: String,
},
LorentzConfigError {
reason: String,
},
}Expand description
Unified error type for all fin-stream pipeline operations.
Each variant carries enough context to reconstruct the failure site without
inspecting internal state. The Display impl is machine-parseable: field
values never contain the literal substring used as a delimiter.
Variants§
ConnectionFailed
WebSocket connection failed.
Fields
Disconnected
WebSocket disconnected unexpectedly.
ReconnectExhausted
Reconnection attempts exhausted.
Fields
ParseError
Tick deserialization failed.
Fields
StaleFeed
Feed is stale – no data received within staleness threshold.
Fields
BookReconstructionFailed
Order book reconstruction failed.
Fields
BookCrossed
Order book is crossed (bid >= ask).
Fields
Backpressure
Backpressure: the downstream channel is full.
Fields
UnknownExchange(String)
Invalid exchange format.
Io(String)
I/O error.
WebSocket(String)
WebSocket protocol error.
RingBufferFull
SPSC ring buffer is full; the producer must back off or drop the item.
This variant is returned by crate::ring::SpscRing::push when the
buffer has no free slots. It never panics.
RingBufferEmpty
SPSC ring buffer is empty; no item is available for the consumer.
This variant is returned by crate::ring::SpscRing::pop when there
are no pending items. Callers should retry or park the consumer thread.
AggregationError
An error occurred during OHLCV bar aggregation.
Wraps structural errors such as receiving a tick for the wrong symbol or a timeframe with a zero-duration period.
NormalizationError
An error occurred during coordinate normalization.
Typically indicates that the normalizer received a value outside the expected numeric range, or that the rolling window is not yet seeded.
InvalidTick
A tick failed structural validation before entering the pipeline.
Examples: negative price, zero quantity, timestamp in the past beyond the configured tolerance.
LorentzConfigError
The Lorentz transform configuration is invalid.
The relativistic velocity parameter beta (v/c) must satisfy 0 <= beta < 1. A beta of exactly 1 (or above) would produce a division by zero in the Lorentz factor gamma = 1 / sqrt(1 - beta^2).
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()