Skip to main content

nominal_api/conjure/errors/module/
module_rids_not_found.rs

1/// One or more modules were not found in the current workspace.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct ModuleRidsNotFound {
17    #[builder(default, set(item(type = conjure_object::ResourceIdentifier)))]
18    #[serde(
19        rename = "moduleRids",
20        skip_serializing_if = "std::collections::BTreeSet::is_empty",
21        default
22    )]
23    module_rids: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
24}
25impl ModuleRidsNotFound {
26    /// Constructs a new instance of the type.
27    #[inline]
28    pub fn new() -> Self {
29        Self::builder().build()
30    }
31    #[inline]
32    pub fn module_rids(
33        &self,
34    ) -> &std::collections::BTreeSet<conjure_object::ResourceIdentifier> {
35        &self.module_rids
36    }
37}
38impl conjure_error::ErrorType for ModuleRidsNotFound {
39    #[inline]
40    fn code() -> conjure_error::ErrorCode {
41        conjure_error::ErrorCode::NotFound
42    }
43    #[inline]
44    fn name() -> &'static str {
45        "Module:ModuleRidsNotFound"
46    }
47    #[inline]
48    fn safe_args() -> &'static [&'static str] {
49        &["moduleRids"]
50    }
51}