Skip to main content

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

1/// Left-shifts the bits in each value (cast to int64) by the given number of positions.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    conjure_object::private::DeriveWith
8)]
9#[serde(crate = "conjure_object::serde")]
10#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
11#[conjure_object::private::staged_builder::staged_builder]
12#[builder(crate = conjure_object::private::staged_builder, update, inline)]
13pub struct BitShiftLeft {
14    #[builder(custom(type = super::NumericSeries, convert = Box::new))]
15    #[serde(rename = "input")]
16    input: Box<super::NumericSeries>,
17    #[builder(custom(type = super::IntegerConstant, convert = Box::new))]
18    #[serde(rename = "operand")]
19    operand: Box<super::IntegerConstant>,
20}
21impl BitShiftLeft {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new(input: super::NumericSeries, operand: super::IntegerConstant) -> Self {
25        Self::builder().input(input).operand(operand).build()
26    }
27    /// Input numeric series (values cast to int64).
28    #[inline]
29    pub fn input(&self) -> &super::NumericSeries {
30        &*self.input
31    }
32    /// Number of positions to shift left.
33    #[inline]
34    pub fn operand(&self) -> &super::IntegerConstant {
35        &*self.operand
36    }
37}