#[non_exhaustive]pub enum TradingLineAction {
Cancel(Order),
Modify(Order, OrderRequest),
Close(Position),
Reverse(Position),
Exit(Position, OrderRequest),
}Expand description
What the user asked for on a trading line. Confirm it with the user, then send it to the broker.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Cancel(Order)
Cancel the working order.
Modify(Order, OrderRequest)
Replace the working order with the request: the user dragged its price, a take profit or its stop loss, removed one of them, or dragged a take profit or stop loss out of its label.
Close(Position)
Close the position at the market.
Reverse(Position)
Turn the position into one of the same size on the other side, at the market.
Exit(Position, OrderRequest)
Place the order the user dragged out of the position’s TP or SL button: a limit order for a take profit or a stop order for a stop loss, on the other side for the position’s size.
Trait Implementations§
Source§impl Clone for TradingLineAction
impl Clone for TradingLineAction
Source§fn clone(&self) -> TradingLineAction
fn clone(&self) -> TradingLineAction
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 TradingLineAction
impl Debug for TradingLineAction
Source§impl PartialEq for TradingLineAction
impl PartialEq for TradingLineAction
impl StructuralPartialEq for TradingLineAction
Auto Trait Implementations§
impl Freeze for TradingLineAction
impl RefUnwindSafe for TradingLineAction
impl Send for TradingLineAction
impl Sync for TradingLineAction
impl Unpin for TradingLineAction
impl UnsafeUnpin for TradingLineAction
impl UnwindSafe for TradingLineAction
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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