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>,
}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
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for TrdAcc
impl Message for TrdAcc
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
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,
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,
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,
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,
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,
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 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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for TrdAcc
Auto Trait Implementations§
impl Freeze for TrdAcc
impl RefUnwindSafe for TrdAcc
impl Send for TrdAcc
impl Sync for TrdAcc
impl Unpin for TrdAcc
impl UnwindSafe for TrdAcc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more