pub struct ProtoOaMarginCall {
pub margin_call_type: i32,
pub margin_level_threshold: f64,
pub utc_last_update_timestamp: Option<i64>,
}Expand description
- Margin call entity, specifies threshold for exact margin call type. Only 3 instances of margin calls are supported, identified by marginCallType. See ProtoOANotificationType for details.
Fields§
§margin_call_type: i32Type of margin call. All margin calls are similar, only difference is in marginLevelThreshold.
margin_level_threshold: f64Margin level threshold for margin call.
utc_last_update_timestamp: Option<i64>The Unix time in milliseconds of the last update of the margin call.
Implementations§
Source§impl ProtoOaMarginCall
impl ProtoOaMarginCall
Sourcepub fn margin_call_type(&self) -> ProtoOaNotificationType
pub fn margin_call_type(&self) -> ProtoOaNotificationType
Returns the enum value of margin_call_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_margin_call_type(&mut self, value: ProtoOaNotificationType)
pub fn set_margin_call_type(&mut self, value: ProtoOaNotificationType)
Sets margin_call_type to the provided enum value.
Sourcepub fn utc_last_update_timestamp(&self) -> i64
pub fn utc_last_update_timestamp(&self) -> i64
Returns the value of utc_last_update_timestamp, or the default value if utc_last_update_timestamp is unset.
Trait Implementations§
Source§impl Clone for ProtoOaMarginCall
impl Clone for ProtoOaMarginCall
Source§fn clone(&self) -> ProtoOaMarginCall
fn clone(&self) -> ProtoOaMarginCall
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 ProtoOaMarginCall
impl Debug for ProtoOaMarginCall
Source§impl Default for ProtoOaMarginCall
impl Default for ProtoOaMarginCall
Source§impl<'de> Deserialize<'de> for ProtoOaMarginCall
impl<'de> Deserialize<'de> for ProtoOaMarginCall
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 ProtoOaMarginCall
impl Message for ProtoOaMarginCall
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.Source§impl PartialEq for ProtoOaMarginCall
impl PartialEq for ProtoOaMarginCall
Source§impl Serialize for ProtoOaMarginCall
impl Serialize for ProtoOaMarginCall
impl Copy for ProtoOaMarginCall
impl StructuralPartialEq for ProtoOaMarginCall
Auto Trait Implementations§
impl Freeze for ProtoOaMarginCall
impl RefUnwindSafe for ProtoOaMarginCall
impl Send for ProtoOaMarginCall
impl Sync for ProtoOaMarginCall
impl Unpin for ProtoOaMarginCall
impl UnwindSafe for ProtoOaMarginCall
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