deriv_api_schema/
mt5_account_category.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/mt5_new_account/send.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
12
13/// [Optional] To choose whether account is conventional or swap_free. Unavailable for financial_stp MT5_account_type
14#[derive(Debug, Clone, Serialize, Deserialize)] // Enums should also derive Serialize/Deserialize
15#[serde(rename_all = "snake_case")]
16pub enum Mt5AccountCategory {
17    Conventional,
18    SwapFree,
19    Gold,
20}
21
22// Optional: Derive Default for enums, defaulting to the first variant? Or require explicit handling?
23// For now, DO NOT derive Default for enums automatically. Structs needing them must handle it.
24
25/* // Example: Deriving Default for Enum (use with caution)
26impl Default for Mt5AccountCategory {
27    fn default() -> Self {
28        // Default to the first variant found
29        Self::Conventional
30    }
31}
32*/
33