Skip to main content

AccountInfoRsp

Struct AccountInfoRsp 

Source
pub struct AccountInfoRsp {
Show 15 fields pub msg_header: Option<MsgHeader>, pub result: Option<i32>, pub err_msg: Option<String>, pub union_fund_info: Option<AccFundInfo>, pub union_today_statistic: Option<TodayTrdStatistic>, pub union_cash_info: Option<AccCashInfo>, pub fund_info_list: Vec<AccFundInfo>, pub today_statistic_list: Vec<TodayTrdStatistic>, pub cash_info_list: Vec<AccCashInfo>, pub pstn_info_list: Vec<AccPstnInfo>, pub fund_pstn_info_list: Vec<AccPstnInfo>, pub diff_market_today_statistic_list: Vec<TodayTrdStatistic>, pub combo_info_list: Vec<ComboInfo>, pub diff_market_fund_info_list: Vec<AccFundInfo>, pub portfolio_pstn_info_list: Vec<AccPstnInfo>,
}

Fields§

§msg_header: Option<MsgHeader>§result: Option<i32>

成功0,过载错误:296

§err_msg: Option<String>§union_fund_info: Option<AccFundInfo>

目前证券账户是单币种的,但以后一个账户可能有多个币种,现金、持仓信息直接返回原币种信息即可 但资金信息的购买力等、今日交易统计中的今日成交额等,都需要换算成统一币种相加再展示,即 union_fund_info 和 union_today_statistic 假设用户实际有1港币1美元,fund_info_list里面会有两个item,分别是1港币和1美元,union_fund_info是换算成请求中指定币种后的值,假设汇率是8且指定换算为港币的话,union就会是9港币 港股与美股没有多币种,只有市场默认对应货币:港币或者美元,因此请求目标币种无效,没有分币种信息。 期货5与全能账户6有多币种信息,可以请求目标币种。

统一成换算币种的资金信息

§union_today_statistic: Option<TodayTrdStatistic>

统一成换算币种的今日交易统计信息

§union_cash_info: Option<AccCashInfo>

统一成换算币种的现金信息列表

§fund_info_list: Vec<AccFundInfo>

分币种的资金信息列表

§today_statistic_list: Vec<TodayTrdStatistic>

分币种的今日交易统计信息列表

§cash_info_list: Vec<AccCashInfo>

分币种的现金信息列表

§pstn_info_list: Vec<AccPstnInfo>

分币种的证券持仓信息列表

§fund_pstn_info_list: Vec<AccPstnInfo>

分币种的基金持仓信息列表

§diff_market_today_statistic_list: Vec<TodayTrdStatistic>

分市场的今日交易统计信息列表(仅全能账户) 仅返回 profit currency stock_market 字段

§combo_info_list: Vec<ComboInfo>

分币种的组合视图持仓信息列表,不包括财富基金的基金和债券持仓

§diff_market_fund_info_list: Vec<AccFundInfo>

分(交易)市场的资金信息列表(仅全能账户) 仅返回 mv diluted_profit currency stock_market,且只有部分市场返回total asset(市值+现金)

§portfolio_pstn_info_list: Vec<AccPstnInfo>

分币种的投资组合持仓信息列表,无论持仓视图还是组合视图都是从这里返回投资组合持仓

Implementations§

Source§

impl AccountInfoRsp

Source

pub fn result(&self) -> i32

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

Source

pub fn err_msg(&self) -> &str

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

Trait Implementations§

Source§

impl Clone for AccountInfoRsp

Source§

fn clone(&self) -> AccountInfoRsp

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 AccountInfoRsp

Source§

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

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

impl Default for AccountInfoRsp

Source§

fn default() -> Self

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

impl Message for AccountInfoRsp

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 AccountInfoRsp

Source§

fn eq(&self, other: &AccountInfoRsp) -> 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 AccountInfoRsp

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