nautilus_model/identifiers/
default.rs

1use crate::identifiers::{
2    AccountId, ClientId, ClientOrderId, PositionId, StrategyId, Symbol, TradeId, TraderId, Venue,
3    VenueOrderId,
4};
5
6impl Default for AccountId {
7    /// Creates a new default [`AccountId`] instance for testing.
8    fn default() -> Self {
9        Self::from("SIM-001")
10    }
11}
12
13impl Default for ClientId {
14    /// Creates a new default [`ClientId`] instance for testing.
15    fn default() -> Self {
16        Self::from("SIM")
17    }
18}
19
20impl Default for ClientOrderId {
21    /// Creates a new default [`ClientOrderId`] instance for testing.
22    fn default() -> Self {
23        Self::from("O-19700101-000000-001-001-1")
24    }
25}
26
27impl Default for PositionId {
28    /// Creates a new default [`PositionId`] instance for testing.
29    fn default() -> Self {
30        Self::from("P-001")
31    }
32}
33
34impl Default for StrategyId {
35    /// Creates a new default [`StrategyId`] instance for testing.
36    fn default() -> Self {
37        Self::from("S-001")
38    }
39}
40
41impl Default for TradeId {
42    /// Creates a new default [`TradeId`] instance for testing.
43    fn default() -> Self {
44        Self::from("1")
45    }
46}
47
48impl Default for TraderId {
49    /// Creates a new default [`TraderId`] instance for testing.
50    fn default() -> Self {
51        Self::from("TRADER-001")
52    }
53}
54impl Default for Symbol {
55    /// Creates a new default [`Symbol`] instance for testing.
56    fn default() -> Self {
57        Self::from("AUD/USD")
58    }
59}
60
61impl Default for Venue {
62    /// Creates a new default [`Venue`] instance for testing.
63    fn default() -> Self {
64        Self::from("SIM")
65    }
66}
67
68impl Default for VenueOrderId {
69    /// Creates a new default [`VenueOrderId`] instance for testing.
70    fn default() -> Self {
71        Self::from("001")
72    }
73}