nomy_data_models/enums/
position_direction.rs1#![allow(clippy::too_many_arguments, unused_imports, non_camel_case_types)]
2use serde::{Deserialize, Serialize};
8
9#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
11pub enum PositionDirection {
12 #[serde(rename = "buy")]
13 BUY,
14 #[serde(rename = "sell")]
15 SELL,
16}
17
18impl PositionDirection {
19 pub fn as_str(&self) -> &'static str {
21 match self {
22 PositionDirection::BUY => "buy",
23 PositionDirection::SELL => "sell",
24 }
25 }
26}