deriv_api_schema/
product.rs

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