pub struct VenuePortAdapter<V: Venue> { /* private fields */ }Expand description
将现有 Venue 事实适配为应用层 VenuePort。它只做事实类型转换,不写
EventLog/OMS;真正的副作用仍由 ExecutionGateway(PortExecutionService)统一编排。
Implementations§
Source§impl<V: Venue> VenuePortAdapter<V>
impl<V: Venue> VenuePortAdapter<V>
pub fn new(venue: V) -> Self
Sourcepub fn new_for_any_venue(venue: V) -> Self
pub fn new_for_any_venue(venue: V) -> Self
Paper/模拟路由可以把多个底层 Instrument Venue 映射到同一个虚拟
Venue;实盘适配器必须继续使用 new,保持严格路由校验。
pub fn into_inner(self) -> V
pub fn venue(&self) -> &V
Trait Implementations§
Source§impl<V: Venue> VenuePort for VenuePortAdapter<V>
impl<V: Venue> VenuePort for VenuePortAdapter<V>
fn venue_id(&self) -> &str
fn capabilities(&self) -> VenueCapabilities
Source§fn execution_readiness(&self) -> Result<(), String>
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>
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.
fn submit_order_group( &mut self, group: &OrderGroupState, ts: u64, ) -> Result<OrderGroupSubmission, String>
fn submit_order( &mut self, order: Order, ts: u64, ) -> Result<Vec<ExecutionEvent>, String>
fn cancel_order( &mut self, client_order_id: u64, ts: u64, ) -> Result<Vec<ExecutionEvent>, String>
fn validate_amend_order( &mut self, current: &Order, amended: &Order, ) -> Result<(), String>
fn amend_order( &mut self, current: &Order, amended: &Order, ts: u64, ) -> Result<Vec<ExecutionEvent>, String>
fn validate_submit_capabilities(&self, order: &Order) -> Result<(), String>
Source§impl<V: Venue> VenueRouterPort for VenuePortAdapter<V>
impl<V: Venue> VenueRouterPort for VenuePortAdapter<V>
fn capabilities_for(&self, venue_id: &str) -> Option<VenueCapabilities>
fn execution_readiness_for(&self, venue_id: &str) -> Result<(), String>
fn submit_order( &mut self, venue_id: &str, order: Order, ts: u64, ) -> Result<Vec<ExecutionEvent>, String>
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> 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