pub struct CodePreset {
pub name: String,
pub unit_table: i32,
pub price_tick: f64,
pub buy_frozen_coeff: f64,
pub sell_frozen_coeff: f64,
pub exchange: String,
pub commission_coeff_peramount: f64,
pub commission_coeff_pervol: f64,
pub commission_coeff_today_peramount: f64,
pub commission_coeff_today_pervol: f64,
}
Fields§
§name: String
§unit_table: i32
§price_tick: f64
§buy_frozen_coeff: f64
§sell_frozen_coeff: f64
§exchange: String
§commission_coeff_peramount: f64
§commission_coeff_pervol: f64
§commission_coeff_today_peramount: f64
§commission_coeff_today_pervol: f64
Implementations§
Source§impl CodePreset
impl CodePreset
pub fn calc_marketvalue(&mut self, price: f64, volume: f64) -> f64
pub fn calc_frozenmoney(&mut self, price: f64, volume: f64) -> f64
pub fn calc_commission(&mut self, price: f64, volume: f64) -> f64
pub fn calc_tax(&mut self, price: f64, volume: f64, towards: i32) -> f64
pub fn calc_commission_today(&mut self, price: f64, volume: f64) -> f64
pub fn calc_coeff(&mut self) -> f64
pub fn print(&mut self)
Trait Implementations§
Source§impl Clone for CodePreset
impl Clone for CodePreset
Source§fn clone(&self) -> CodePreset
fn clone(&self) -> CodePreset
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 CodePreset
impl Debug for CodePreset
Source§impl<'de> Deserialize<'de> for CodePreset
impl<'de> Deserialize<'de> for CodePreset
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
Auto Trait Implementations§
impl Freeze for CodePreset
impl RefUnwindSafe for CodePreset
impl Send for CodePreset
impl Sync for CodePreset
impl Unpin for CodePreset
impl UnwindSafe for CodePreset
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