pub struct MdCore { /* private fields */ }Expand description
The sans-io core of the market data connector.
Implementations§
Source§impl MdCore
impl MdCore
Sourcepub fn notifier(&self) -> Arc<Notify> ⓘ
pub fn notifier(&self) -> Arc<Notify> ⓘ
Woken whenever a subscription changes state (confirmed, refused, or data came). The connector waits on it for the confirmation of a new subscription.
Sourcepub fn register(
&mut self,
guid: &str,
id: SubscriptionId,
kind: SubscriptionKind,
)
pub fn register( &mut self, guid: &str, id: SubscriptionId, kind: SubscriptionKind, )
Registers a subscription: frames with this guid belong to id and are read as kind. The connector
calls it before the request is sent, so the confirmation cannot overtake it.
Sourcepub fn forget(&mut self, guid: &str)
pub fn forget(&mut self, guid: &str)
Forgets a subscription (the data that still arrives for its guid is dropped).
Sourcepub fn actual_state(&self, id: SubscriptionId) -> Option<SubState>
pub fn actual_state(&self, id: SubscriptionId) -> Option<SubState>
The state of a subscription.
Trait Implementations§
Source§impl BrokerCore for MdCore
impl BrokerCore for MdCore
Source§type Frame = WsIncoming
type Frame = WsIncoming
The inbound frame type: for example
String for WebSocket text, or a decoded message.Source§fn on_frame(&mut self, frame: Self::Frame, now: Instant, out: &mut EventSink)
fn on_frame(&mut self, frame: Self::Frame, now: Instant, out: &mut EventSink)
Handles one inbound transport frame received at
now. Read moreSource§fn poll_transmit(&mut self) -> Option<Outbound>
fn poll_transmit(&mut self) -> Option<Outbound>
Takes the next outbound wire message, if any. Call it until it returns
None.Source§fn poll_timeout(&self) -> Option<Instant>
fn poll_timeout(&self) -> Option<Instant>
Source§fn on_timeout(&mut self, _now: Instant, _out: &mut EventSink)
fn on_timeout(&mut self, _now: Instant, _out: &mut EventSink)
Handles a timer that fired.
now is the time the timer was due.Auto Trait Implementations§
impl Freeze for MdCore
impl RefUnwindSafe for MdCore
impl Send for MdCore
impl Sync for MdCore
impl Unpin for MdCore
impl UnsafeUnpin for MdCore
impl UnwindSafe for MdCore
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