pub struct FillModelHandle(/* private fields */);Expand description
Shared runtime handle for a fill model.
Implementations§
Source§impl FillModelHandle
impl FillModelHandle
Sourcepub fn new<T>(model: T) -> Selfwhere
T: FillModel + 'static,
pub fn new<T>(model: T) -> Selfwhere
T: FillModel + 'static,
Creates a new FillModelHandle from a fill model.
Trait Implementations§
Source§impl Clone for FillModelHandle
impl Clone for FillModelHandle
Source§fn clone(&self) -> FillModelHandle
fn clone(&self) -> FillModelHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FillModelHandle
impl Debug for FillModelHandle
Source§impl Default for FillModelHandle
impl Default for FillModelHandle
Source§impl FillModel for FillModelHandle
impl FillModel for FillModelHandle
Source§fn is_limit_filled(&mut self) -> bool
fn is_limit_filled(&mut self) -> bool
Returns
true if a limit order should be filled based on the model.Source§fn is_slipped(&mut self) -> bool
fn is_slipped(&mut self) -> bool
Returns
true if an order fill should slip by one tick.Source§fn fill_limit_inside_spread(&self) -> bool
fn fill_limit_inside_spread(&self) -> bool
Returns whether limit orders at or inside the spread are fillable. Read more
Source§fn get_orderbook_for_fill_simulation(
&mut self,
instrument: &InstrumentAny,
order: &OrderAny,
best_bid: Price,
best_ask: Price,
) -> Option<OrderBook>
fn get_orderbook_for_fill_simulation( &mut self, instrument: &InstrumentAny, order: &OrderAny, best_bid: Price, best_ask: Price, ) -> Option<OrderBook>
Returns a simulated
OrderBook for fill simulation. Read moreSource§impl From<FillModelAny> for FillModelHandle
impl From<FillModelAny> for FillModelHandle
Source§fn from(model: FillModelAny) -> Self
fn from(model: FillModelAny) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for FillModelHandle
impl !Send for FillModelHandle
impl !Sync for FillModelHandle
impl !UnwindSafe for FillModelHandle
impl Freeze for FillModelHandle
impl Unpin for FillModelHandle
impl UnsafeUnpin for FillModelHandle
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