pub struct SecurityList {
pub security_req_id: String,
pub security_response_id: String,
pub security_request_result: i32,
pub securities: Vec<SecurityInfo>,
}Expand description
Security List response message (MsgType = y)
Fields§
§security_req_id: StringSecurity Request ID from the original request (Tag 320)
security_response_id: StringSecurity Response ID (Tag 322)
security_request_result: i32Security Request Result (Tag 560) - Always 0 for successful response
securities: Vec<SecurityInfo>List of securities (Tag 146 - NoRelatedSym)
Implementations§
Source§impl SecurityList
impl SecurityList
Sourcepub fn new(
security_req_id: String,
security_response_id: String,
securities: Vec<SecurityInfo>,
) -> Self
pub fn new( security_req_id: String, security_response_id: String, securities: Vec<SecurityInfo>, ) -> Self
Create a new Security List response
Sourcepub fn success(
security_req_id: String,
security_response_id: String,
securities: Vec<SecurityInfo>,
) -> Self
pub fn success( security_req_id: String, security_response_id: String, securities: Vec<SecurityInfo>, ) -> Self
Create a successful response
Sourcepub fn is_successful(&self) -> bool
pub fn is_successful(&self) -> bool
Check if the response is successful
Sourcepub fn filter_by_type(&self, security_type: SecurityType) -> Vec<&SecurityInfo>
pub fn filter_by_type(&self, security_type: SecurityType) -> Vec<&SecurityInfo>
Filter securities by type
Sourcepub fn filter_by_currency(&self, currency: &str) -> Vec<&SecurityInfo>
pub fn filter_by_currency(&self, currency: &str) -> Vec<&SecurityInfo>
Filter securities by currency
Sourcepub fn to_fix_message(
&self,
sender_comp_id: String,
target_comp_id: String,
msg_seq_num: u32,
) -> DeribitFixResult<FixMessage>
pub fn to_fix_message( &self, sender_comp_id: String, target_comp_id: String, msg_seq_num: u32, ) -> DeribitFixResult<FixMessage>
Convert to FIX message
Trait Implementations§
Source§impl Clone for SecurityList
impl Clone for SecurityList
Source§fn clone(&self) -> SecurityList
fn clone(&self) -> SecurityList
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 SecurityList
impl Debug for SecurityList
Source§impl<'de> Deserialize<'de> for SecurityList
impl<'de> Deserialize<'de> for SecurityList
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 SecurityList
impl RefUnwindSafe for SecurityList
impl Send for SecurityList
impl Sync for SecurityList
impl Unpin for SecurityList
impl UnwindSafe for SecurityList
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