Skip to main content

Account

Struct Account 

Source
pub struct Account {
Show 30 fields pub id: Option<u64>, pub broker: Option<Broker>, pub market: Option<u32>, pub acc_id: Option<u32>, pub enable_market: Vec<u32>, pub owner_uid: Option<u64>, pub opr_uid: Option<u64>, pub type: Option<i32>, pub state: Option<i32>, pub mixed_state: Option<i32>, pub card_number: Option<String>, pub trade_disable: Option<bool>, pub self_trade_disable: Option<bool>, pub loan_enable: Option<bool>, pub self_loan_enable: Option<bool>, pub grant_state: Option<i32>, pub acc_diy_name: Option<String>, pub acc_business_name: Vec<AccBusinessName>, pub hk_bcan_info: Option<HkbcanInfo>, pub settlement_type: Option<u32>, pub sub_accounts: Vec<SubAccount>, pub is_esop: Option<bool>, pub ira_type: Option<u32>, pub trading_capability: Vec<u32>, pub custodian_info: Vec<CustodianInfo>, pub kouza_type: Option<u32>, pub name_info: Option<NameInfo>, pub broker_type_info: Option<BrokerTypeInfo>, pub esop_type: Option<String>, pub permissions: Vec<Permission>,
}
Expand description

业务账户(第二层)

Fields§

§id: Option<u64>

账户ID,唯一标记一个业务账户(跨券商唯一)

§broker: Option<Broker>

由brokerID(16bit)+marketID(16bit,后端)+accountID(32bit)组成的64位长ID

所属券商

§market: Option<u32>

市场ID,取值参考AccountMarket枚举

§acc_id: Option<u32>

业务ID(broker_firm_id+market_id+account_id唯一标记一个业务账户)

§enable_market: Vec<u32>

交易市场,取值参考TradeMarket枚举

§owner_uid: Option<u64>

用户ID(账户归属人ID)

§opr_uid: Option<u64>

用户ID(账户操作人ID,同请求uid)

§type: Option<i32>

业务账户融资类型,取值参考Type枚举

§state: Option<i32>

业务账户状态,取值参考State枚举

§mixed_state: Option<i32>

混合状态(只会返回3,4),取值参考MixedState枚举

§card_number: Option<String>

业务账户16位卡号

§trade_disable: Option<bool>

后台是否禁止该业务账户的交易能力

§self_trade_disable: Option<bool>

用户自己是否禁止该业务账户的交易能力

§loan_enable: Option<bool>

后台是否允许该业务账户使用融资能力

§self_loan_enable: Option<bool>

用户自己是否允许该业务账户使用融资能力

§grant_state: Option<i32>

授权状态(以前富途HK交易社会化引入的,废弃,默认取0)

§acc_diy_name: Option<String>

业务账户自定义别名(废弃,后端返回空)

§acc_business_name: Vec<AccBusinessName>

账户业务名称(ESOP专有账户名称)

§hk_bcan_info: Option<HkbcanInfo>

富途HK港股BCAN信息

§settlement_type: Option<u32>

交收模式,取值参考SettlementType枚举

§sub_accounts: Vec<SubAccount>

子账户列表

§is_esop: Option<bool>

是否有ESOP激励入口

§ira_type: Option<u32>

税减账户类型,取值参见枚举IRAType,非税减账户,该字段不设置

§trading_capability: Vec<u32>

交易能力,取值参考TradingCapability(目前已支持CA,AU,MY;JP于日本信用账户需求开始支持)

§custodian_info: Vec<CustodianInfo>

上游托管信息,例如澳洲账户支持港股正股,美股正股和澳股正股

§kouza_type: Option<u32>

但是只有澳股正股有托管的概念,这里就会只会返回澳股正股的托管模式

JP账户类型(JP特有),取值参考枚举KouzaType

§name_info: Option<NameInfo>

业务账户名称信息;如果为综合账户下的业务账户,其数据和其所属的综合账户数据相同

§broker_type_info: Option<BrokerTypeInfo>

OM账户信息,只有账户是OM账户的情况该字段才有值

§esop_type: Option<String>

账户的ESOP类型,取值参考EsopType枚举

§permissions: Vec<Permission>

交易权限列表,目前只有CA主体有该特性

Implementations§

Source§

impl Account

Source

pub fn id(&self) -> u64

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

Source

pub fn market(&self) -> u32

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

Source

pub fn acc_id(&self) -> u32

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

Source

pub fn owner_uid(&self) -> u64

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

Source

pub fn opr_uid(&self) -> u64

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

Source

pub fn type(&self) -> Type

Returns the enum value of type, or the default if the field is unset or set to an invalid enum value.

Source

pub fn set_type(&mut self, value: Type)

Sets type to the provided enum value.

Source

pub fn state(&self) -> State

Returns the enum value of state, or the default if the field is unset or set to an invalid enum value.

Source

pub fn set_state(&mut self, value: State)

Sets state to the provided enum value.

Source

pub fn mixed_state(&self) -> MixedState

Returns the enum value of mixed_state, or the default if the field is unset or set to an invalid enum value.

Source

pub fn set_mixed_state(&mut self, value: MixedState)

Sets mixed_state to the provided enum value.

Source

pub fn card_number(&self) -> &str

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

Source

pub fn trade_disable(&self) -> bool

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

Source

pub fn self_trade_disable(&self) -> bool

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

Source

pub fn loan_enable(&self) -> bool

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

Source

pub fn self_loan_enable(&self) -> bool

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

Source

pub fn grant_state(&self) -> GrantState

Returns the enum value of grant_state, or the default if the field is unset or set to an invalid enum value.

Source

pub fn set_grant_state(&mut self, value: GrantState)

Sets grant_state to the provided enum value.

Source

pub fn acc_diy_name(&self) -> &str

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

Source

pub fn settlement_type(&self) -> u32

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

Source

pub fn is_esop(&self) -> bool

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

Source

pub fn ira_type(&self) -> u32

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

Source

pub fn kouza_type(&self) -> u32

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

Source

pub fn esop_type(&self) -> &str

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

Trait Implementations§

Source§

impl Clone for Account

Source§

fn clone(&self) -> Account

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 Account

Source§

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

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

impl Default for Account

Source§

fn default() -> Self

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

impl Message for Account

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 Account

Source§

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

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