Skip to main content

nominal_api/conjure/objects/scout/compute/api/
bit_test_function.rs

1/// Returns the bit at the specified index, where the right-most bit has index 0.
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 BitTestFunction {
18    #[serde(rename = "index")]
19    index: i32,
20}
21impl BitTestFunction {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new(index: i32) -> Self {
25        Self::builder().index(index).build()
26    }
27    #[inline]
28    pub fn index(&self) -> i32 {
29        self.index
30    }
31}