nominal_api/conjure/errors/scout/compute/api/
too_few_inputs.rs1#[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 TooFewInputs {
18 #[serde(rename = "requiredInputCount")]
19 required_input_count: i32,
20 #[serde(rename = "providedInputCount")]
21 provided_input_count: i32,
22}
23impl TooFewInputs {
24 #[inline]
26 pub fn new(required_input_count: i32, provided_input_count: i32) -> Self {
27 Self::builder()
28 .required_input_count(required_input_count)
29 .provided_input_count(provided_input_count)
30 .build()
31 }
32 #[inline]
33 pub fn required_input_count(&self) -> i32 {
34 self.required_input_count
35 }
36 #[inline]
37 pub fn provided_input_count(&self) -> i32 {
38 self.provided_input_count
39 }
40}
41impl conjure_error::ErrorType for TooFewInputs {
42 #[inline]
43 fn code() -> conjure_error::ErrorCode {
44 conjure_error::ErrorCode::InvalidArgument
45 }
46 #[inline]
47 fn name() -> &'static str {
48 "Compute:TooFewInputs"
49 }
50 #[inline]
51 fn safe_args() -> &'static [&'static str] {
52 &["providedInputCount", "requiredInputCount"]
53 }
54}