pub struct TrdAcc {Show 21 fields
pub id: u64,
pub broker: Broker,
pub market_id: i32,
pub intra_acc_id: u32,
pub user_profile: UserProfile,
pub type: i32,
pub state: i32,
pub card_number: String,
pub trade_disable: bool,
pub self_trade_disable: bool,
pub loan_enable: bool,
pub self_loan_enable: bool,
pub has_trade_pswd: bool,
pub mixed_state: i32,
pub trade_pswd_is_6digit: bool,
pub acc_business_name: Vec<AccBusinessName>,
pub acc_diy_name: Option<String>,
pub optional_uid64: Option<u64>,
pub new_market_id: u32,
pub enable_market: Vec<u32>,
pub grant_state: Option<i32>,
}Expand description
业务账户(仅2008协议依赖)
Fields§
§id: u64账户ID,唯一标记一个业务账户(跨券商唯一)
broker: Broker由brokerID(16bit)+marketID(16bit,后端)+accountID(32bit)组成的64位长ID
所属券商
market_id: i32旧市场类型,取值参考:MarketId枚举(客户端A股通以后版本该字段废弃,使用new_market_id)
intra_acc_id: u32业务账户ID,即后端的accountID
user_profile: UserProfile账户所有者资料(废弃)
type: i32业务账户融资类型,取值参考Type枚举
state: i32业务账户状态,取值参考State枚举
card_number: String业务账户16位卡号
trade_disable: bool后台是否禁止该业务账户的交易能力
self_trade_disable: bool用户自己是否禁止该业务账户的交易能力
loan_enable: bool后台是否允许该业务账户使用融资能力
self_loan_enable: bool用户自己是否允许该业务账户使用融资能力
has_trade_pswd: bool是否已经设置了交易密码
mixed_state: i32混合状态(只会返回3,4),取值参考MixedState枚举
trade_pswd_is_6digit: bool交易密码是否是6位数字密码
acc_business_name: Vec<AccBusinessName>账户业务名称(ESOP专有账户名称)
acc_diy_name: Option<String>业务账户自定义别名(废弃,后端返回空)
optional_uid64: Option<u64>账户操作者uid(以前富途HK交易社会化引入的,现在该功能已下线,当前取值为账户归属人UID)
new_market_id: u32新的市场类型(客户端A股通以后版本使用该字段取代market_id字段)
enable_market: Vec<u32>取值参考:港股0/美股1/A股通3/期货4/证券账户6/港币13/美元23 这个取值比较奇怪,有疑问参考介绍文档或者联系服务方
交易市场,取值参考TradeMarket枚举
grant_state: Option<i32>授权状态(以前富途HK交易社会化引入的,废弃,默认取0)
Implementations§
Source§impl TrdAcc
impl TrdAcc
Sourcepub fn market_id(&self) -> MarketId
pub fn market_id(&self) -> MarketId
Returns the enum value of market_id, or the default if the field is set to an invalid enum value.
Sourcepub fn set_market_id(&mut self, value: MarketId)
pub fn set_market_id(&mut self, value: MarketId)
Sets market_id to the provided enum value.
Sourcepub fn type(&self) -> Type
pub fn type(&self) -> Type
Returns the enum value of type, or the default if the field is set to an invalid enum value.
Sourcepub fn state(&self) -> State
pub fn state(&self) -> State
Returns the enum value of state, or the default if the field is set to an invalid enum value.
Sourcepub fn mixed_state(&self) -> MixedState
pub fn mixed_state(&self) -> MixedState
Returns the enum value of mixed_state, or the default if the field is set to an invalid enum value.
Sourcepub fn set_mixed_state(&mut self, value: MixedState)
pub fn set_mixed_state(&mut self, value: MixedState)
Sets mixed_state to the provided enum value.
Sourcepub fn acc_diy_name(&self) -> &str
pub fn acc_diy_name(&self) -> &str
Returns the value of acc_diy_name, or the default value if acc_diy_name is unset.
Sourcepub fn optional_uid64(&self) -> u64
pub fn optional_uid64(&self) -> u64
Returns the value of optional_uid64, or the default value if optional_uid64 is unset.
Sourcepub fn grant_state(&self) -> GrantState
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.
Sourcepub fn set_grant_state(&mut self, value: GrantState)
pub fn set_grant_state(&mut self, value: GrantState)
Sets grant_state to the provided enum value.
Trait Implementations§
Source§impl Message for TrdAcc
impl Message for TrdAcc
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.