deriv_api_schema/accounts.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/transfer_between_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/// [Optional] To control the list of accounts returned when `account_from` or `account_to` is not provided. `brief` (default value) means that accounts with `mt5` account_type will be excluded; it will run faster. `all` means that all accounts with any account_type (including `mt5`) will be returned.
14#[derive(Debug, Clone, Serialize, Deserialize)] // Enums should also derive Serialize/Deserialize
15#[serde(rename_all = "snake_case")]
16pub enum Accounts {
17 All,
18 Brief,
19}
20
21// Optional: Derive Default for enums, defaulting to the first variant? Or require explicit handling?
22// For now, DO NOT derive Default for enums automatically. Structs needing them must handle it.
23
24/* // Example: Deriving Default for Enum (use with caution)
25impl Default for Accounts {
26 fn default() -> Self {
27 // Default to the first variant found
28 Self::All
29 }
30}
31*/
32