nomy_data_models/models/
position_status.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 PositionStatus {
12 #[serde(rename = "open")]
13 OPEN,
14 #[serde(rename = "closed")]
15 CLOSED,
16}
17
18impl PositionStatus {
19 pub fn as_str(&self) -> &'static str {
21 match self {
22 PositionStatus::OPEN => "open",
23 PositionStatus::CLOSED => "closed",
24 }
25 }
26}