deriv_api_schema/
sub_account_category.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/mt5_login_list/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
12
13/// Sub account category refer to the additional risk management
14#[derive(Debug, Clone, Serialize, Deserialize)] // Enums should also derive Serialize/Deserialize
15#[serde(rename_all = "snake_case")]
16pub enum SubAccountCategory {
17    Value,
18    SwapFree,
19    SwapFreeHighRisk,
20    Lim,
21    Hr,
22    Ab,
23    Ba,
24    Stp,
25    Gold,
26}
27
28// Optional: Derive Default for enums, defaulting to the first variant? Or require explicit handling?
29// For now, DO NOT derive Default for enums automatically. Structs needing them must handle it.
30
31/* // Example: Deriving Default for Enum (use with caution)
32impl Default for SubAccountCategory {
33    fn default() -> Self {
34        // Default to the first variant found
35        Self::Value
36    }
37}
38*/
39