Skip to main content

nominal_api/conjure/errors/persistent/compute/api/
window_negative.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash,
11    Copy
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 WindowNegative {
17    #[serde(rename = "window")]
18    window: conjure_object::SafeLong,
19}
20impl WindowNegative {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new(window: conjure_object::SafeLong) -> Self {
24        Self::builder().window(window).build()
25    }
26    #[inline]
27    pub fn window(&self) -> conjure_object::SafeLong {
28        self.window
29    }
30}
31impl conjure_error::ErrorType for WindowNegative {
32    #[inline]
33    fn code() -> conjure_error::ErrorCode {
34        conjure_error::ErrorCode::InvalidArgument
35    }
36    #[inline]
37    fn name() -> &'static str {
38        "PersistentCompute:WindowNegative"
39    }
40    #[inline]
41    fn safe_args() -> &'static [&'static str] {
42        &["window"]
43    }
44}