pub struct CandlePollerService { /* private fields */ }Expand description
Periodic poll of a CandleSource for a single (symbol, interval)
pair. Publishes each newly-closed candle to the
MarketDataBus.
Per-symbol cadences are achieved by spawning multiple services —
Bot::with_candle_poller(...) accepts repeated calls and spawns one
service per registered tuple.
§Deduplication
The service tracks the highest Candle::time it has already
published; only candles with a strictly greater timestamp are
re-published. This is robust against exchanges that return overlapping
windows on consecutive polls.
Implementations§
Trait Implementations§
Source§impl TradingService for CandlePollerService
impl TradingService for CandlePollerService
Source§fn restart_policy(&self) -> RestartPolicy
fn restart_policy(&self) -> RestartPolicy
When should the supervisor restart this service on exit?
Auto Trait Implementations§
impl !Freeze for CandlePollerService
impl !RefUnwindSafe for CandlePollerService
impl !UnwindSafe for CandlePollerService
impl Send for CandlePollerService
impl Sync for CandlePollerService
impl Unpin for CandlePollerService
impl UnsafeUnpin for CandlePollerService
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