deriv_api_schema/msg_type.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/p2p_order_create/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/// Action name of the request made.
14#[derive(Debug, Clone, Serialize, Deserialize)] // Enums should also derive Serialize/Deserialize
15#[serde(rename_all = "snake_case")]
16pub enum MsgType {
17 P2pOrderCreate,
18}
19
20// Optional: Derive Default for enums, defaulting to the first variant? Or require explicit handling?
21// For now, DO NOT derive Default for enums automatically. Structs needing them must handle it.
22
23/* // Example: Deriving Default for Enum (use with caution)
24impl Default for MsgType {
25 fn default() -> Self {
26 // Default to the first variant found
27 Self::P2pOrderCreate
28 }
29}
30*/
31