Struct UdCore
pub struct UdCore { /* private fields */ }Expand description
The sans-io core of the user data connector.
Implementations§
§impl UdCore
impl UdCore
pub fn sub_state(&self, id: SubscriptionId) -> (SubState, Option<String>)
pub fn sub_state(&self, id: SubscriptionId) -> (SubState, Option<String>)
The state of a subscription.
pub fn register(
&mut self,
id: SubscriptionId,
kind: UdSubKind,
topics: &[String],
reqs: &[(String, String)],
)
pub fn register( &mut self, id: SubscriptionId, kind: UdSubKind, topics: &[String], reqs: &[(String, String)], )
Registers a subscription for topics; reqs are (request id, topic) pairs of the requests that are about to
be sent.
pub fn forget(&mut self, id: SubscriptionId) -> Vec<String>
pub fn forget(&mut self, id: SubscriptionId) -> Vec<String>
Forgets a subscription. Returns the topics nobody listens to any more.
pub fn learn_order_id(&mut self, order_id: &str, cid: Uuid)
pub fn learn_order_id(&mut self, order_id: &str, cid: Uuid)
Remembers that the order with this number is the order of cid.
pub fn cid_of_order_id(&self, order_id: &str) -> Option<Uuid>
pub fn cid_of_order_id(&self, order_id: &str) -> Option<Uuid>
The cid of the order with this number, if the core has seen it.
pub fn resolve_cid(&mut self, order_id: &str, link_id: &str) -> Uuid
pub fn resolve_cid(&mut self, order_id: &str, link_id: &str) -> Uuid
The cid of an order of the exchange: the one in its orderLinkId, else the one learned for its number, else a
stable made-up one (the order is not ours).
Trait Implementations§
§impl BrokerCore for UdCore
impl BrokerCore for UdCore
§type Frame = WsIncoming
type Frame = WsIncoming
The inbound frame type: for example
String for WebSocket text, or a decoded message.§fn on_frame(
&mut self,
frame: <UdCore as BrokerCore>::Frame,
now: Instant,
out: &mut EventSink,
)
fn on_frame( &mut self, frame: <UdCore as BrokerCore>::Frame, now: Instant, out: &mut EventSink, )
Handles one inbound transport frame received at
now. Read more§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.§fn poll_timeout(&self) -> Option<Instant>
fn poll_timeout(&self) -> Option<Instant>
§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 UdCore
impl RefUnwindSafe for UdCore
impl Send for UdCore
impl Sync for UdCore
impl Unpin for UdCore
impl UnsafeUnpin for UdCore
impl UnwindSafe for UdCore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].