Struct kucoin_rs::kucoin::trade::OrderOptionals[][src]

pub struct OrderOptionals<'a> {
    pub remark: Option<&'a str>,
    pub stop: Option<&'a str>,
    pub stop_price: Option<&'a str>,
    pub stp: Option<&'a str>,
    pub trade_type: Option<&'a str>,
    pub time_in_force: Option<&'a str>,
    pub cancel_after: Option<i64>,
    pub post_only: Option<bool>,
    pub hidden: Option<bool>,
    pub iceberg: Option<bool>,
    pub visible_size: Option<&'a str>,
}
Expand description

OrderOptionals contains a builder pattern that can be used to more easily take advantage of optional inputs.

Example:

use kucoin_rs::kucoin::trade::OrderOptionals;

    let options = OrderOptionals::new()
        .remark("Example of OrderOptionals builder pattern")
        .stp("CO")
        .hidden(true)
        .build();

See the Kucoin documentation for full list of options relative to market and limit orders.

Fields

remark: Option<&'a str>stop: Option<&'a str>stop_price: Option<&'a str>stp: Option<&'a str>trade_type: Option<&'a str>time_in_force: Option<&'a str>cancel_after: Option<i64>post_only: Option<bool>hidden: Option<bool>iceberg: Option<bool>visible_size: Option<&'a str>

Implementations

impl<'a> OrderOptionals<'a>[src]

Generates new empty OrderOptionals struct ready for building.

pub fn new() -> Self[src]

pub fn remark(&mut self, r: &'a str) -> &mut Self[src]

pub fn stop(&mut self, s: &'a str) -> &mut Self[src]

pub fn stop_price(&mut self, s: &'a str) -> &mut Self[src]

pub fn stp(&mut self, s: &'a str) -> &mut Self[src]

pub fn time_in_force(&mut self, t: &'a str) -> &mut Self[src]

pub fn trade_type(&mut self, t: &'a str) -> &mut Self[src]

pub fn cancel_after(&mut self, c: i64) -> &mut Self[src]

pub fn post_only(&mut self, p: bool) -> &mut Self[src]

pub fn hidden(&mut self, h: bool) -> &mut Self[src]

pub fn iceberg(&mut self, i: bool) -> &mut Self[src]

pub fn visible_size(&mut self, v: &'a str) -> &mut Self[src]

pub fn build(&self) -> Self[src]

Builds an OrderOptional Type from chained optional funtions to be used with posting orders. Only contains optional inputs the post order functions require specific required inputs. See those functions’ documentation for details.

Trait Implementations

impl<'a> Clone for OrderOptionals<'a>[src]

fn clone(&self) -> OrderOptionals<'a>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for OrderOptionals<'a>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'a> Default for OrderOptionals<'a>[src]

fn default() -> OrderOptionals<'a>[src]

Returns the “default value” for a type. Read more

impl<'a> PartialEq<OrderOptionals<'a>> for OrderOptionals<'a>[src]

fn eq(&self, other: &OrderOptionals<'a>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &OrderOptionals<'a>) -> bool[src]

This method tests for !=.

impl<'a> StructuralPartialEq for OrderOptionals<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for OrderOptionals<'a>

impl<'a> Send for OrderOptionals<'a>

impl<'a> Sync for OrderOptionals<'a>

impl<'a> Unpin for OrderOptionals<'a>

impl<'a> UnwindSafe for OrderOptionals<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V