pub struct FlexQueryResponse {
pub query_name: Option<String>,
pub query_type: Option<String>,
pub statements: FlexStatementsWrapper,
}Expand description
Top-level FLEX query response
This is the root XML element in IB FLEX files. It wraps one or more
ActivityFlexStatements along with query metadata.
Note: When using crate::parse_activity_flex, this wrapper is handled
automatically and you receive the ActivityFlexStatement directly.
§Example
use ib_flex::types::FlexQueryResponse;
use quick_xml::de::from_str;
let xml = r#"<?xml version="1.0" encoding="UTF-8"?>
<FlexQueryResponse queryName="Activity" type="AF">
<FlexStatements count="1">
<FlexStatement accountId="U1234567" fromDate="2025-01-01"
toDate="2025-01-31" whenGenerated="2025-01-31;150000">
<Trades />
<OpenPositions />
<CashTransactions />
<CorporateActions />
<SecuritiesInfo />
<ConversionRates />
</FlexStatement>
</FlexStatements>
</FlexQueryResponse>"#;
let response: FlexQueryResponse = from_str(xml).unwrap();
assert_eq!(response.query_name, Some("Activity".to_string()));
assert_eq!(response.statements.statements.len(), 1);Fields§
§query_name: Option<String>Query name
query_type: Option<String>Query type
statements: FlexStatementsWrapperFlexStatements wrapper
Trait Implementations§
Source§impl Clone for FlexQueryResponse
impl Clone for FlexQueryResponse
Source§fn clone(&self) -> FlexQueryResponse
fn clone(&self) -> FlexQueryResponse
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 FlexQueryResponse
impl Debug for FlexQueryResponse
Source§impl<'de> Deserialize<'de> for FlexQueryResponse
impl<'de> Deserialize<'de> for FlexQueryResponse
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 PartialEq for FlexQueryResponse
impl PartialEq for FlexQueryResponse
Source§impl Serialize for FlexQueryResponse
impl Serialize for FlexQueryResponse
impl StructuralPartialEq for FlexQueryResponse
Auto Trait Implementations§
impl Freeze for FlexQueryResponse
impl RefUnwindSafe for FlexQueryResponse
impl Send for FlexQueryResponse
impl Sync for FlexQueryResponse
impl Unpin for FlexQueryResponse
impl UnwindSafe for FlexQueryResponse
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