Skip to main content

nominal_api/conjure/objects/scout/comparisonnotebook/api/
comparison_channel_variable_map.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Deserialize,
5    conjure_object::serde::Serialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash,
11    Default
12)]
13#[serde(crate = "conjure_object::serde", transparent)]
14pub struct ComparisonChannelVariableMap(
15    pub std::collections::BTreeMap<super::VariableName, super::ChannelVariable>,
16);
17impl std::iter::FromIterator<(super::VariableName, super::ChannelVariable)>
18for ComparisonChannelVariableMap {
19    fn from_iter<T>(iter: T) -> Self
20    where
21        T: std::iter::IntoIterator<Item = (super::VariableName, super::ChannelVariable)>,
22    {
23        ComparisonChannelVariableMap(std::iter::FromIterator::from_iter(iter))
24    }
25}
26impl std::convert::From<
27    std::collections::BTreeMap<super::VariableName, super::ChannelVariable>,
28> for ComparisonChannelVariableMap {
29    #[inline]
30    fn from(
31        v: std::collections::BTreeMap<super::VariableName, super::ChannelVariable>,
32    ) -> Self {
33        ComparisonChannelVariableMap(std::convert::From::from(v))
34    }
35}
36impl std::ops::Deref for ComparisonChannelVariableMap {
37    type Target = std::collections::BTreeMap<
38        super::VariableName,
39        super::ChannelVariable,
40    >;
41    #[inline]
42    fn deref(
43        &self,
44    ) -> &std::collections::BTreeMap<super::VariableName, super::ChannelVariable> {
45        &self.0
46    }
47}
48impl std::ops::DerefMut for ComparisonChannelVariableMap {
49    #[inline]
50    fn deref_mut(
51        &mut self,
52    ) -> &mut std::collections::BTreeMap<super::VariableName, super::ChannelVariable> {
53        &mut self.0
54    }
55}
56impl std::convert::AsRef<
57    std::collections::BTreeMap<super::VariableName, super::ChannelVariable>,
58> for ComparisonChannelVariableMap {
59    #[inline]
60    fn as_ref(
61        &self,
62    ) -> &std::collections::BTreeMap<super::VariableName, super::ChannelVariable> {
63        &self.0
64    }
65}