1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//! Domain identifier represents an ID associated to a domain entity
//!
//! This module provides types and utilities for managing and manipulating domain identifiers.
//!
//! # Examples
//!
//! Creating a `DomainIdSet` with two domain identifiers:
//!
//! ```
//! use disintegrate::{DomainId, DomainIdSet, Identifier, domain_ids, IntoIdentifierValue};
//!
//! // Create domain ids
//! let identifier1 = Identifier::new("id1").unwrap();
//! let identifier2 = Identifier::new("id2").unwrap();
//!
//! // Create a DomainIdSet
//! let mut domain_ids = domain_ids! {
//! id1: "value1", id2: "value2"
//! };
//!
//! // Insert a new domain id
//! let new_domain_id = DomainId {
//! key: Identifier::new("id3").unwrap(),
//! value: "value3".into_identifier_value(),
//! };
//! domain_ids.insert(new_domain_id);
//!
//! // Access domain identifiers
//! assert_eq!(domain_ids.len(), 3);
//! assert_eq!(domain_ids.get(&identifier1), Some("value1".into_identifier_value()).as_ref());
//! assert_eq!(domain_ids.get(&identifier2), Some("value2".into_identifier_value()).as_ref());
//!
//! // Iterate over domain identifiers
//! for (key, value) in &*domain_ids {
//! println!("Identifier: {}, Value: {}", key, value);
//! }
//! ```
use crate::;
use ;
/// Represents a key-value pair of domain identifiers.
///
/// The `DomainId` struct is used to associate a specific `Identifier` key with a corresponding value.
/// A set of domain identifiers, represented as a map of `Identifier` keys and values.
///
/// The `DomainIdSet` struct is used to store a collection of domain identifiers.
;
/// Implements the `Deref` trait for `DomainIdSet`, allowing it to be dereferenced to a `HashMap<Identifier, IdentifierValue>`.
/// This enables transparent access to the underlying `BTreeMap` of domain identifiers.
/// Creates a domain identifiers set.
=> ;
=> ;
}