Skip to main content

nominal_api/conjure/errors/storage/writer/api/
invalid_struct.rs

1/// Ingested Struct is not a valid JSON struct
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 InvalidStruct {}
18impl InvalidStruct {
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 InvalidStruct {
26    #[inline]
27    fn code() -> conjure_error::ErrorCode {
28        conjure_error::ErrorCode::InvalidArgument
29    }
30    #[inline]
31    fn name() -> &'static str {
32        "NominalChannelWriter:InvalidStruct"
33    }
34    #[inline]
35    fn safe_args() -> &'static [&'static str] {
36        &[]
37    }
38}