pub struct PositionRisk {
pub position_id: u64,
pub symbol: String,
pub exchange: Option<String>,
pub backend_trade_market: Option<u32>,
pub backend_security_type: Option<u32>,
pub coverage: i32,
pub coverage_message: Option<String>,
pub event_list: Vec<CorporateActionEvent>,
}Fields§
§position_id: u64§symbol: String§exchange: Option<String>§backend_trade_market: Option<u32>§backend_security_type: Option<u32>§coverage: i32§coverage_message: Option<String>§event_list: Vec<CorporateActionEvent>Implementations§
Source§impl PositionRisk
impl PositionRisk
Sourcepub fn exchange(&self) -> &str
pub fn exchange(&self) -> &str
Returns the value of exchange, or the default value if exchange is unset.
Sourcepub fn backend_trade_market(&self) -> u32
pub fn backend_trade_market(&self) -> u32
Returns the value of backend_trade_market, or the default value if backend_trade_market is unset.
Sourcepub fn backend_security_type(&self) -> u32
pub fn backend_security_type(&self) -> u32
Returns the value of backend_security_type, or the default value if backend_security_type is unset.
Sourcepub fn coverage(&self) -> CoverageStatus
pub fn coverage(&self) -> CoverageStatus
Returns the enum value of coverage, or the default if the field is set to an invalid enum value.
Sourcepub fn set_coverage(&mut self, value: CoverageStatus)
pub fn set_coverage(&mut self, value: CoverageStatus)
Sets coverage to the provided enum value.
Sourcepub fn coverage_message(&self) -> &str
pub fn coverage_message(&self) -> &str
Returns the value of coverage_message, or the default value if coverage_message is unset.
Trait Implementations§
Source§impl Clone for PositionRisk
impl Clone for PositionRisk
Source§fn clone(&self) -> PositionRisk
fn clone(&self) -> PositionRisk
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PositionRisk
impl Debug for PositionRisk
Source§impl Default for PositionRisk
impl Default for PositionRisk
Source§impl<'de> Deserialize<'de> for PositionRiskwhere
PositionRisk: Default,
impl<'de> Deserialize<'de> for PositionRiskwhere
PositionRisk: Default,
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 PositionRisk
impl Message for PositionRisk
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 PositionRisk
impl PartialEq for PositionRisk
Source§fn eq(&self, other: &PositionRisk) -> bool
fn eq(&self, other: &PositionRisk) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PositionRisk
impl Serialize for PositionRisk
impl StructuralPartialEq for PositionRisk
Auto Trait Implementations§
impl Freeze for PositionRisk
impl RefUnwindSafe for PositionRisk
impl Send for PositionRisk
impl Sync for PositionRisk
impl Unpin for PositionRisk
impl UnsafeUnpin for PositionRisk
impl UnwindSafe for PositionRisk
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