pub struct PositionLifecycleEngine { /* private fields */ }Implementations§
Source§impl PositionLifecycleEngine
impl PositionLifecycleEngine
pub fn on_entry_filled( &mut self, instrument: &str, source_tag: &str, entry_price: f64, qty: f64, expected_holding_ms: u64, now_ms: u64, ) -> String
pub fn on_tick( &mut self, instrument: &str, mark_price: f64, now_ms: u64, ) -> Option<ExitTrigger>
pub fn set_stop_loss_order_id( &mut self, instrument: &str, order_id: Option<String>, )
pub fn has_valid_stop_loss(&self, instrument: &str) -> bool
pub fn on_position_closed( &mut self, instrument: &str, ) -> Option<PositionLifecycleState>
Trait Implementations§
Source§impl Default for PositionLifecycleEngine
impl Default for PositionLifecycleEngine
Source§fn default() -> PositionLifecycleEngine
fn default() -> PositionLifecycleEngine
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PositionLifecycleEngine
impl RefUnwindSafe for PositionLifecycleEngine
impl Send for PositionLifecycleEngine
impl Sync for PositionLifecycleEngine
impl Unpin for PositionLifecycleEngine
impl UnsafeUnpin for PositionLifecycleEngine
impl UnwindSafe for PositionLifecycleEngine
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more