deriv_api_schema/contract_type.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/buy_contract_for_multiple_accounts/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/// A valid contract-type
14#[derive(Debug, Clone, Serialize, Deserialize)] // Enums should also derive Serialize/Deserialize
15#[serde(rename_all = "snake_case")]
16pub enum ContractType {
17 MULTUP,
18 MULTDOWN,
19 UPORDOWN,
20 EXPIRYRANGE,
21 ONETOUCH,
22 CALLE,
23 LBHIGHLOW,
24 ASIAND,
25 EXPIRYRANGEE,
26 DIGITDIFF,
27 DIGITMATCH,
28 DIGITOVER,
29 PUTE,
30 DIGITUNDER,
31 NOTOUCH,
32 CALL,
33 RANGE,
34 LBFLOATPUT,
35 DIGITODD,
36 PUT,
37 ASIANU,
38 LBFLOATCALL,
39 EXPIRYMISSE,
40 EXPIRYMISS,
41 DIGITEVEN,
42 TICKHIGH,
43 TICKLOW,
44 RESETCALL,
45 RESETPUT,
46 CALLSPREAD,
47 PUTSPREAD,
48 RUNHIGH,
49 RUNLOW,
50 VANILLALONGCALL,
51 VANILLALONGPUT,
52 TURBOSLONG,
53 TURBOSSHORT,
54}
55
56// Optional: Derive Default for enums, defaulting to the first variant? Or require explicit handling?
57// For now, DO NOT derive Default for enums automatically. Structs needing them must handle it.
58
59/* // Example: Deriving Default for Enum (use with caution)
60impl Default for ContractType {
61 fn default() -> Self {
62 // Default to the first variant found
63 Self::MULTUP
64 }
65}
66*/
67