pub struct RiskEngine {
pub throttled_submit_order: Throttler<SubmitOrder, Box<dyn Fn(SubmitOrder)>>,
pub throttled_modify_order: Throttler<ModifyOrder, Box<dyn Fn(ModifyOrder)>>,
/* private fields */
}
Fields§
§throttled_submit_order: Throttler<SubmitOrder, Box<dyn Fn(SubmitOrder)>>
§throttled_modify_order: Throttler<ModifyOrder, Box<dyn Fn(ModifyOrder)>>
Implementations§
Source§impl RiskEngine
impl RiskEngine
pub fn new( config: RiskEngineConfig, portfolio: Portfolio, clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, ) -> Self
pub fn execute(&mut self, command: TradingCommand)
pub fn process(&mut self, event: OrderEventAny)
pub fn set_trading_state(&mut self, state: TradingState)
pub fn set_max_notional_per_order( &mut self, instrument_id: InstrumentId, new_value: Decimal, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RiskEngine
impl !RefUnwindSafe for RiskEngine
impl !Send for RiskEngine
impl !Sync for RiskEngine
impl Unpin for RiskEngine
impl !UnwindSafe for RiskEngine
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