pub struct GetProfitCalculationRequest {
pub close_price: Decimal,
pub cmd: TradingCommand,
pub open_price: Decimal,
pub symbol: String,
pub volume: Decimal,
}
Expand description
Structure representing the order with operation code, price and volume
Fields§
§close_price: Decimal
Theoretical close price of order
cmd: TradingCommand
Operation code
open_price: Decimal
Theoretical open price of order
symbol: String
Symbol
volume: Decimal
Volume
Implementations§
Source§impl GetProfitCalculationRequest
impl GetProfitCalculationRequest
Sourcepub fn with_close_price(self, value: impl Into<Decimal>) -> Self
pub fn with_close_price(self, value: impl Into<Decimal>) -> Self
Sets the close_price
field of this struct.
Sourcepub fn with_cmd(self, value: impl Into<TradingCommand>) -> Self
pub fn with_cmd(self, value: impl Into<TradingCommand>) -> Self
Sets the cmd
field of this struct.
Sourcepub fn with_open_price(self, value: impl Into<Decimal>) -> Self
pub fn with_open_price(self, value: impl Into<Decimal>) -> Self
Sets the open_price
field of this struct.
Sourcepub fn with_symbol(self, value: impl Into<String>) -> Self
pub fn with_symbol(self, value: impl Into<String>) -> Self
Sets the symbol
field of this struct.
Sourcepub fn with_volume(self, value: impl Into<Decimal>) -> Self
pub fn with_volume(self, value: impl Into<Decimal>) -> Self
Sets the volume
field of this struct.
Trait Implementations§
Source§impl Clone for GetProfitCalculationRequest
impl Clone for GetProfitCalculationRequest
Source§fn clone(&self) -> GetProfitCalculationRequest
fn clone(&self) -> GetProfitCalculationRequest
Returns a duplicate of the value. Read more
1.0.0 · 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 GetProfitCalculationRequest
impl Debug for GetProfitCalculationRequest
Source§impl Default for GetProfitCalculationRequest
impl Default for GetProfitCalculationRequest
Source§fn default() -> GetProfitCalculationRequest
fn default() -> GetProfitCalculationRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GetProfitCalculationRequest
impl<'de> Deserialize<'de> for GetProfitCalculationRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for GetProfitCalculationRequest
Auto Trait Implementations§
impl Freeze for GetProfitCalculationRequest
impl RefUnwindSafe for GetProfitCalculationRequest
impl Send for GetProfitCalculationRequest
impl Sync for GetProfitCalculationRequest
impl Unpin for GetProfitCalculationRequest
impl UnwindSafe for GetProfitCalculationRequest
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