pub struct SetAutoAddMarginParams {
pub category: Category,
pub symbol: String,
pub auto_add_margin: i32,
pub position_idx: Option<PositionIdx>,
}Expand description
Parameters for setting auto add margin.
Fields§
§category: CategoryProduct category (must be linear).
symbol: StringTrading symbol.
auto_add_margin: i32Auto add margin (0=off, 1=on).
position_idx: Option<PositionIdx>Position index.
Implementations§
Source§impl SetAutoAddMarginParams
impl SetAutoAddMarginParams
Sourcepub fn enable(category: Category, symbol: impl Into<String>) -> Self
pub fn enable(category: Category, symbol: impl Into<String>) -> Self
Create parameters to enable auto add margin.
Sourcepub fn disable(category: Category, symbol: impl Into<String>) -> Self
pub fn disable(category: Category, symbol: impl Into<String>) -> Self
Create parameters to disable auto add margin.
Sourcepub fn position_idx(self, idx: PositionIdx) -> Self
pub fn position_idx(self, idx: PositionIdx) -> Self
Set position index.
Trait Implementations§
Source§impl Clone for SetAutoAddMarginParams
impl Clone for SetAutoAddMarginParams
Source§fn clone(&self) -> SetAutoAddMarginParams
fn clone(&self) -> SetAutoAddMarginParams
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 SetAutoAddMarginParams
impl Debug for SetAutoAddMarginParams
Auto Trait Implementations§
impl Freeze for SetAutoAddMarginParams
impl RefUnwindSafe for SetAutoAddMarginParams
impl Send for SetAutoAddMarginParams
impl Sync for SetAutoAddMarginParams
impl Unpin for SetAutoAddMarginParams
impl UnwindSafe for SetAutoAddMarginParams
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