longport/trade/requests/
get_today_executions.rsuse serde::Serialize;
#[derive(Debug, Default, Serialize, Clone)]
pub struct GetTodayExecutionsOptions {
#[serde(skip_serializing_if = "Option::is_none")]
symbol: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
order_id: Option<String>,
}
impl GetTodayExecutionsOptions {
#[inline]
pub fn new() -> Self {
Default::default()
}
#[inline]
#[must_use]
pub fn symbol(self, symbol: impl Into<String>) -> Self {
Self {
symbol: Some(symbol.into()),
..self
}
}
#[inline]
#[must_use]
pub fn order_id(self, order_id: impl Into<String>) -> Self {
Self {
order_id: Some(order_id.into()),
..self
}
}
}