pub struct MarketFeedService { /* private fields */ }Expand description
Drives a MarketSource under supervisor control.
The wrapper does not interact with the bus directly — the source’s
run method is expected to publish events to whatever bus it was
constructed with. This service just makes the source restartable and
drop-safe under the supervisor’s cancellation contract.
Implementations§
Source§impl MarketFeedService
impl MarketFeedService
Sourcepub fn new(source: Arc<dyn MarketSource>) -> Self
pub fn new(source: Arc<dyn MarketSource>) -> Self
Wrap a MarketSource into a TradingService.
Trait Implementations§
Source§impl TradingService for MarketFeedService
impl TradingService for MarketFeedService
Source§fn restart_policy(&self) -> RestartPolicy
fn restart_policy(&self) -> RestartPolicy
When should the supervisor restart this service on exit?
Auto Trait Implementations§
impl !RefUnwindSafe for MarketFeedService
impl !UnwindSafe for MarketFeedService
impl Freeze for MarketFeedService
impl Send for MarketFeedService
impl Sync for MarketFeedService
impl Unpin for MarketFeedService
impl UnsafeUnpin for MarketFeedService
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