Skip to main content

VenuePortAdapter

Struct VenuePortAdapter 

Source
pub struct VenuePortAdapter<V: Venue> { /* private fields */ }
Expand description

将现有 Venue 事实适配为应用层 VenuePort。它只做事实类型转换,不写 EventLog/OMS;真正的副作用仍由 ExecutionGateway(PortExecutionService)统一编排。

Implementations§

Source§

impl<V: Venue> VenuePortAdapter<V>

Source

pub fn new(venue: V) -> Self

Source

pub fn new_for_any_venue(venue: V) -> Self

Paper/模拟路由可以把多个底层 Instrument Venue 映射到同一个虚拟 Venue;实盘适配器必须继续使用 new,保持严格路由校验。

Source

pub fn into_inner(self) -> V

Source

pub fn venue(&self) -> &V

Trait Implementations§

Source§

impl<V: Venue> VenuePort for VenuePortAdapter<V>

Source§

fn venue_id(&self) -> &str

Source§

fn capabilities(&self) -> VenueCapabilities

Source§

fn execution_readiness(&self) -> Result<(), String>

Dynamic connector/reconciliation gate, checked before the gateway registers an order.
Source§

fn validate_submit_order_group( &mut self, group: &OrderGroupState, ) -> Result<(), String>

Native groups are a separate venue capability; ordinary conditional orders do not imply OCO.
Source§

fn submit_order_group( &mut self, group: &OrderGroupState, ts: u64, ) -> Result<OrderGroupSubmission, String>

Source§

fn submit_order( &mut self, order: Order, ts: u64, ) -> Result<Vec<ExecutionEvent>, String>

Source§

fn cancel_order( &mut self, client_order_id: u64, ts: u64, ) -> Result<Vec<ExecutionEvent>, String>

Source§

fn validate_amend_order( &mut self, current: &Order, amended: &Order, ) -> Result<(), String>

Source§

fn amend_order( &mut self, current: &Order, amended: &Order, ts: u64, ) -> Result<Vec<ExecutionEvent>, String>

Source§

fn validate_submit_capabilities(&self, order: &Order) -> Result<(), String>

Source§

impl<V: Venue> VenueRouterPort for VenuePortAdapter<V>

Source§

fn capabilities_for(&self, venue_id: &str) -> Option<VenueCapabilities>

Source§

fn execution_readiness_for(&self, venue_id: &str) -> Result<(), String>

Source§

fn submit_order( &mut self, venue_id: &str, order: Order, ts: u64, ) -> Result<Vec<ExecutionEvent>, String>

Source§

fn cancel_order( &mut self, venue_id: &str, client_order_id: u64, ts: u64, ) -> Result<Vec<ExecutionEvent>, String>

Auto Trait Implementations§

§

impl<V> Forget for VenuePortAdapter<V>

§

impl<V> Freeze for VenuePortAdapter<V>
where V: Freeze,

§

impl<V> Move for VenuePortAdapter<V>

§

impl<V> RefUnwindSafe for VenuePortAdapter<V>
where V: RefUnwindSafe,

§

impl<V> Send for VenuePortAdapter<V>
where V: Send,

§

impl<V> Sync for VenuePortAdapter<V>
where V: Sync,

§

impl<V> Unpin for VenuePortAdapter<V>
where V: Unpin,

§

impl<V> UnsafeUnpin for VenuePortAdapter<V>
where V: UnsafeUnpin,

§

impl<V> UnwindSafe for VenuePortAdapter<V>
where V: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.