Skip to main content

SupMarginInfo

Struct SupMarginInfo 

Source
pub struct SupMarginInfo {
Show 15 fields pub long_power: Option<String>, pub short_power: Option<String>, pub balance: Option<String>, pub mv: Option<String>, pub elv: Option<String>, pub im: Option<String>, pub mcm: Option<String>, pub mm: Option<String>, pub im_balance: Option<String>, pub mcm_balance: Option<String>, pub mm_balance: Option<String>, pub im_recover: Option<String>, pub elv_mv_ratio: Option<f64>, pub risk_level: Option<u32>, pub margin_call_days: Option<i32>,
}

Fields§

§long_power: Option<String>§short_power: Option<String>§balance: Option<String>§mv: Option<String>§elv: Option<String>§im: Option<String>§mcm: Option<String>§mm: Option<String>§im_balance: Option<String>

可用资金

§mcm_balance: Option<String>

margin_call剩余

§mm_balance: Option<String>

剩余流动性

§im_recover: Option<String>

追收保证金

§elv_mv_ratio: Option<f64>

净资产市值占比

§risk_level: Option<u32>

风险级别类型, 取值参考 SupRiskLevel

§margin_call_days: Option<i32>

产生margin_call持续天数

Implementations§

Source§

impl SupMarginInfo

Source

pub fn long_power(&self) -> &str

Returns the value of long_power, or the default value if long_power is unset.

Source

pub fn short_power(&self) -> &str

Returns the value of short_power, or the default value if short_power is unset.

Source

pub fn balance(&self) -> &str

Returns the value of balance, or the default value if balance is unset.

Source

pub fn mv(&self) -> &str

Returns the value of mv, or the default value if mv is unset.

Source

pub fn elv(&self) -> &str

Returns the value of elv, or the default value if elv is unset.

Source

pub fn im(&self) -> &str

Returns the value of im, or the default value if im is unset.

Source

pub fn mcm(&self) -> &str

Returns the value of mcm, or the default value if mcm is unset.

Source

pub fn mm(&self) -> &str

Returns the value of mm, or the default value if mm is unset.

Source

pub fn im_balance(&self) -> &str

Returns the value of im_balance, or the default value if im_balance is unset.

Source

pub fn mcm_balance(&self) -> &str

Returns the value of mcm_balance, or the default value if mcm_balance is unset.

Source

pub fn mm_balance(&self) -> &str

Returns the value of mm_balance, or the default value if mm_balance is unset.

Source

pub fn im_recover(&self) -> &str

Returns the value of im_recover, or the default value if im_recover is unset.

Source

pub fn elv_mv_ratio(&self) -> f64

Returns the value of elv_mv_ratio, or the default value if elv_mv_ratio is unset.

Source

pub fn risk_level(&self) -> u32

Returns the value of risk_level, or the default value if risk_level is unset.

Source

pub fn margin_call_days(&self) -> i32

Returns the value of margin_call_days, or the default value if margin_call_days is unset.

Trait Implementations§

Source§

impl Clone for SupMarginInfo

Source§

fn clone(&self) -> SupMarginInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SupMarginInfo

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for SupMarginInfo

Source§

fn default() -> Self

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

impl Message for SupMarginInfo

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for SupMarginInfo

Source§

fn eq(&self, other: &SupMarginInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SupMarginInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more