pub struct OrderIndex { /* private fields */ }Expand description
Memory of which Finam order id belongs to which client order id.
Thread safe. The user data connector owns one and its core reads it for every order echo.
See the module docs for an example.
Implementations§
Source§impl OrderIndex
impl OrderIndex
Sourcepub fn know(&self, cid: ClientOrderId)
pub fn know(&self, cid: ClientOrderId)
A cid this process knows about: its tag becomes a lookup key for echoes without comment.
Sourcepub fn bind(&self, cid: ClientOrderId, order_id: &str)
pub fn bind(&self, cid: ClientOrderId, order_id: &str)
Remembers that Finam order order_id belongs to cid. An empty order_id is ignored.
Sourcepub fn forget(&self, cid: ClientOrderId)
pub fn forget(&self, cid: ClientOrderId)
Forgets everything kept for cid: the pair with its Finam order id and its tag. For an order that
finished long ago. A later echo of that order resolves through its comment again, or to a made-up cid.
Sourcepub fn order_id(&self, cid: ClientOrderId) -> Option<String>
pub fn order_id(&self, cid: ClientOrderId) -> Option<String>
Finam order id of cid, if this process has seen the pair. None does not mean the order
does not exist: after a restart call reconcile first.
Trait Implementations§
Source§impl Debug for OrderIndex
impl Debug for OrderIndex
Source§impl Default for OrderIndex
impl Default for OrderIndex
Source§fn default() -> OrderIndex
fn default() -> OrderIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for OrderIndex
impl RefUnwindSafe for OrderIndex
impl Send for OrderIndex
impl Sync for OrderIndex
impl Unpin for OrderIndex
impl UnsafeUnpin for OrderIndex
impl UnwindSafe for OrderIndex
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<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].