deriv_api_schema/
trade_duration_item.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/trading_durations/receive.json
4
5// Use direct crate names for imports within generated files
6use serde::{Deserialize, Serialize}; 
7
8
9
10
11// Import shared types from the *same* crate
12use crate::trade_type::TradeType; 
13use crate::duration_item::DurationItem; 
14
15// It's a struct
16#[derive(Debug, Clone, Serialize, Deserialize)]
17#[serde(rename_all = "snake_case")]
18pub struct TradeDurationItem {
19    /// List of trade durations available for the symbols.\n
20    // Correct serde attribute construction - Use helper
21    #[serde(skip_serializing_if = "Option::is_none")] 
22    pub durations: Option<Vec<DurationItem>>,
23    /// List of trade types available for the symbols.\n
24    // Correct serde attribute construction - Use helper
25    #[serde(skip_serializing_if = "Option::is_none")] 
26    pub trade_type: Option<TradeType>,
27}
28