pub struct ReasonObject {
pub reason_code: String,
pub reason_msg: String,
}Expand description
Represents a single reason for a margin mode change outcome.
Part of the MarginModeResult, this struct details a specific reason for the success or failure of the margin mode change. Bots use this for error handling and debugging.
Fields§
§reason_code: StringThe reason code for the outcome.
A code indicating the specific reason for success or failure (e.g., “10001” for invalid settings). Bots use this to implement targeted error handling.
reason_msg: StringA human-readable message describing the reason.
Provides context for the reason_code, such as "Cannot change mode with open positions". Bots should log this for debugging and user feedback.
Trait Implementations§
Source§impl Clone for ReasonObject
impl Clone for ReasonObject
Source§fn clone(&self) -> ReasonObject
fn clone(&self) -> ReasonObject
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 ReasonObject
impl Debug for ReasonObject
Source§impl<'de> Deserialize<'de> for ReasonObject
impl<'de> Deserialize<'de> for ReasonObject
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
Auto Trait Implementations§
impl Freeze for ReasonObject
impl RefUnwindSafe for ReasonObject
impl Send for ReasonObject
impl Sync for ReasonObject
impl Unpin for ReasonObject
impl UnwindSafe for ReasonObject
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