#[repr(C)]pub struct RspInfoField {
pub error_id: i32,
pub error_msg: [u8; 81],
}
Expand description
响应信息
Fields§
§error_id: i32
错误代码
error_msg: [u8; 81]
错误信息
Implementations§
Source§impl RspInfoField
impl RspInfoField
Sourcepub fn get_error_msg(&self) -> CtpResult<String>
pub fn get_error_msg(&self) -> CtpResult<String>
获取错误信息的UTF-8字符串
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
检查是否成功(错误代码为0)
Trait Implementations§
Source§impl Clone for RspInfoField
impl Clone for RspInfoField
Source§fn clone(&self) -> RspInfoField
fn clone(&self) -> RspInfoField
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RspInfoField
impl Debug for RspInfoField
Auto Trait Implementations§
impl Freeze for RspInfoField
impl RefUnwindSafe for RspInfoField
impl Send for RspInfoField
impl Sync for RspInfoField
impl Unpin for RspInfoField
impl UnwindSafe for RspInfoField
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