Skip to main content

nominal_api_conjure/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    conjure_object::log_safety::derive::LogSafe
13)]
14#[serde(crate = "conjure_object::serde")]
15#[conjure_object::private::staged_builder::staged_builder]
16#[builder(crate = conjure_object::private::staged_builder, update, inline)]
17pub struct ModuleRidsNotFound {
18    #[builder(
19        default,
20        set(item(type = super::super::super::objects::modules::api::ModuleRid))
21    )]
22    #[serde(
23        rename = "moduleRids",
24        skip_serializing_if = "std::collections::BTreeSet::is_empty",
25        default
26    )]
27    module_rids: std::collections::BTreeSet<
28        super::super::super::objects::modules::api::ModuleRid,
29    >,
30}
31impl ModuleRidsNotFound {
32    /// Constructs a new instance of the type.
33    #[inline]
34    pub fn new() -> Self {
35        Self::builder().build()
36    }
37    #[inline]
38    pub fn module_rids(
39        &self,
40    ) -> &std::collections::BTreeSet<
41        super::super::super::objects::modules::api::ModuleRid,
42    > {
43        &self.module_rids
44    }
45}
46impl conjure_error::ErrorType for ModuleRidsNotFound {
47    #[inline]
48    fn code() -> conjure_error::ErrorCode {
49        conjure_error::ErrorCode::NotFound
50    }
51    #[inline]
52    fn name() -> &'static str {
53        "Module:ModuleRidsNotFound"
54    }
55    #[inline]
56    fn safe_args() -> &'static [&'static str] {
57        &["moduleRids"]
58    }
59}