conjure_error/types/
not_found.rs

1/// A generic `NOT_FOUND` error.
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    Copy
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 NotFound {}
18impl NotFound {
19    /// Constructs a new instance of the type.
20    #[inline]
21    pub fn new() -> Self {
22        Self::builder().build()
23    }
24}
25impl conjure_error::ErrorType for NotFound {
26    #[inline]
27    fn code(&self) -> conjure_error::ErrorCode {
28        conjure_error::ErrorCode::NotFound
29    }
30    #[inline]
31    fn name(&self) -> &str {
32        "Default:NotFound"
33    }
34    #[inline]
35    fn instance_id(&self) -> Option<conjure_object::Uuid> {
36        None
37    }
38    #[inline]
39    fn safe_args(&self) -> &'static [&'static str] {
40        &[]
41    }
42}