nautilus_model/identifiers/
default.rs

1// -------------------------------------------------------------------------------------------------
2//  Copyright (C) 2015-2025 Nautech Systems Pty Ltd. All rights reserved.
3//  https://nautechsystems.io
4//
5//  Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
6//  You may not use this file except in compliance with the License.
7//  You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
8//
9//  Unless required by applicable law or agreed to in writing, software
10//  distributed under the License is distributed on an "AS IS" BASIS,
11//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//  See the License for the specific language governing permissions and
13//  limitations under the License.
14// -------------------------------------------------------------------------------------------------
15
16use crate::identifiers::{
17    AccountId, ClientId, ClientOrderId, PositionId, StrategyId, Symbol, TradeId, TraderId, Venue,
18    VenueOrderId,
19};
20
21impl Default for AccountId {
22    /// Creates a new default [`AccountId`] instance for testing.
23    fn default() -> Self {
24        Self::from("SIM-001")
25    }
26}
27
28impl Default for ClientId {
29    /// Creates a new default [`ClientId`] instance for testing.
30    fn default() -> Self {
31        Self::from("SIM")
32    }
33}
34
35impl Default for ClientOrderId {
36    /// Creates a new default [`ClientOrderId`] instance for testing.
37    fn default() -> Self {
38        Self::from("O-19700101-000000-001-001-1")
39    }
40}
41
42impl Default for PositionId {
43    /// Creates a new default [`PositionId`] instance for testing.
44    fn default() -> Self {
45        Self::from("P-001")
46    }
47}
48
49impl Default for StrategyId {
50    /// Creates a new default [`StrategyId`] instance for testing.
51    fn default() -> Self {
52        Self::from("S-001")
53    }
54}
55
56impl Default for TradeId {
57    /// Creates a new default [`TradeId`] instance for testing.
58    fn default() -> Self {
59        Self::from("1")
60    }
61}
62
63impl Default for TraderId {
64    /// Creates a new default [`TraderId`] instance for testing.
65    fn default() -> Self {
66        Self::from("TRADER-001")
67    }
68}
69impl Default for Symbol {
70    /// Creates a new default [`Symbol`] instance for testing.
71    fn default() -> Self {
72        Self::from("AUD/USD")
73    }
74}
75
76impl Default for Venue {
77    /// Creates a new default [`Venue`] instance for testing.
78    fn default() -> Self {
79        Self::from("SIM")
80    }
81}
82
83impl Default for VenueOrderId {
84    /// Creates a new default [`VenueOrderId`] instance for testing.
85    fn default() -> Self {
86        Self::from("001")
87    }
88}