Skip to main content

nominal_api/conjure/objects/api/rids/
automatic_check_evaluation_rid.rs

1/// Unique resource identifier for an AutomaticCheckEvaluation.
2/// This is used to identify the evaluation of a check that was automatically triggered.
3#[derive(
4    Debug,
5    Clone,
6    conjure_object::serde::Deserialize,
7    conjure_object::serde::Serialize,
8    PartialEq,
9    Eq,
10    PartialOrd,
11    Ord,
12    Hash
13)]
14#[serde(crate = "conjure_object::serde", transparent)]
15pub struct AutomaticCheckEvaluationRid(pub conjure_object::ResourceIdentifier);
16impl std::fmt::Display for AutomaticCheckEvaluationRid {
17    fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18        std::fmt::Display::fmt(&self.0, fmt)
19    }
20}
21impl conjure_object::Plain for AutomaticCheckEvaluationRid {
22    fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23        conjure_object::Plain::fmt(&self.0, fmt)
24    }
25}
26impl conjure_object::FromPlain for AutomaticCheckEvaluationRid {
27    type Err = <conjure_object::ResourceIdentifier as conjure_object::FromPlain>::Err;
28    #[inline]
29    fn from_plain(s: &str) -> Result<AutomaticCheckEvaluationRid, Self::Err> {
30        conjure_object::FromPlain::from_plain(s).map(AutomaticCheckEvaluationRid)
31    }
32}
33impl std::convert::From<conjure_object::ResourceIdentifier>
34for AutomaticCheckEvaluationRid {
35    #[inline]
36    fn from(v: conjure_object::ResourceIdentifier) -> Self {
37        AutomaticCheckEvaluationRid(std::convert::From::from(v))
38    }
39}
40impl std::ops::Deref for AutomaticCheckEvaluationRid {
41    type Target = conjure_object::ResourceIdentifier;
42    #[inline]
43    fn deref(&self) -> &conjure_object::ResourceIdentifier {
44        &self.0
45    }
46}
47impl std::ops::DerefMut for AutomaticCheckEvaluationRid {
48    #[inline]
49    fn deref_mut(&mut self) -> &mut conjure_object::ResourceIdentifier {
50        &mut self.0
51    }
52}
53impl std::convert::AsRef<conjure_object::ResourceIdentifier>
54for AutomaticCheckEvaluationRid {
55    #[inline]
56    fn as_ref(&self) -> &conjure_object::ResourceIdentifier {
57        &self.0
58    }
59}