nominal_api/conjure/errors/scout/savedviews/api/
invalid_index.rs1#[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 InvalidIndex {
17 #[serde(rename = "index")]
18 index: i32,
19}
20impl InvalidIndex {
21 #[inline]
23 pub fn new(index: i32) -> Self {
24 Self::builder().index(index).build()
25 }
26 #[inline]
27 pub fn index(&self) -> i32 {
28 self.index
29 }
30}
31impl conjure_error::ErrorType for InvalidIndex {
32 #[inline]
33 fn code() -> conjure_error::ErrorCode {
34 conjure_error::ErrorCode::InvalidArgument
35 }
36 #[inline]
37 fn name() -> &'static str {
38 "SavedView:InvalidIndex"
39 }
40 #[inline]
41 fn safe_args() -> &'static [&'static str] {
42 &["index"]
43 }
44}