pub struct TrdAcc {
pub trd_env: i32,
pub acc_id: u64,
pub trd_market_auth_list: Vec<i32>,
pub acc_type: Option<i32>,
pub card_num: Option<String>,
pub security_firm: Option<i32>,
pub sim_acc_type: Option<i32>,
pub uni_card_num: Option<String>,
pub acc_status: Option<i32>,
pub acc_role: Option<i32>,
pub jp_acc_type: Vec<i32>,
pub acc_label: Option<String>,
}Expand description
交易业务账户结构
Fields§
§trd_env: i32交易环境,参见TrdEnv的枚举定义
acc_id: u64业务账号
trd_market_auth_list: Vec<i32>业务账户支持的交易市场权限,即此账户能交易那些市场, 可拥有多个交易市场权限,目前仅单个,取值参见TrdMarket的枚举定义
acc_type: Option<i32>账户类型,取值见TrdAccType
card_num: Option<String>卡号
security_firm: Option<i32>所属券商,取值见SecurityFirm
sim_acc_type: Option<i32>模拟交易账号类型,取值见SimAccType
uni_card_num: Option<String>所属综合账户卡号
acc_status: Option<i32>账号状态,取值见TrdAccStatus
acc_role: Option<i32>账号分类,是不是主账号,取值见TrdAccRole
jp_acc_type: Vec<i32>JP子账户类型,取值见 TrdSubAccType
acc_label: Option<String>v1.4.97 J-Acc-Q3 derived label (daemon-only, 不在 backend proto 中): 客户端可读 daemon 派生的账号 label, 不再靠 acc_type+trd_market_auth_list+ acc_role 启发式组合推断. 当前可能值: “crypto” (加密账号, acc_type=Cash + 空 trd_market_auth_list). 未来扩展: equity_incentive / ipo_route / paper_trade. 客户端: treat unknown labels as opaque strings.
Implementations§
Source§impl TrdAcc
impl TrdAcc
Sourcepub fn acc_type(&self) -> i32
pub fn acc_type(&self) -> i32
Returns the value of acc_type, or the default value if acc_type is unset.
Sourcepub fn card_num(&self) -> &str
pub fn card_num(&self) -> &str
Returns the value of card_num, or the default value if card_num is unset.
Sourcepub fn security_firm(&self) -> i32
pub fn security_firm(&self) -> i32
Returns the value of security_firm, or the default value if security_firm is unset.
Sourcepub fn sim_acc_type(&self) -> i32
pub fn sim_acc_type(&self) -> i32
Returns the value of sim_acc_type, or the default value if sim_acc_type is unset.
Sourcepub fn uni_card_num(&self) -> &str
pub fn uni_card_num(&self) -> &str
Returns the value of uni_card_num, or the default value if uni_card_num is unset.
Sourcepub fn acc_status(&self) -> i32
pub fn acc_status(&self) -> i32
Returns the value of acc_status, or the default value if acc_status is unset.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TrdAcc
impl<'de> Deserialize<'de> for TrdAcc
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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.