Trait snarkvm_circuit::operators::ShlChecked
pub trait ShlChecked<Rhs = Self>where
Rhs: ?Sized,{
type Output;
fn shl_checked(&self, rhs: &Rhs) -> Self::Output;
}
Expand description
Binary operator for left shifting a value, checking that the rhs is less than the number of bits in self.
Required Associated Types
type Output
Required Methods
fn shl_checked(&self, rhs: &Rhs) -> Self::Output
Trait Implementations
impl<E, I, M> Metrics<dyn ShlChecked<Integer<E, M>, Output = Integer<E, I>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
M: Magnitude,
impl<E, I, M> Metrics<dyn ShlChecked<Integer<E, M>, Output = Integer<E, I>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
M: Magnitude,
impl<E, I, M> OutputMode<dyn ShlChecked<Integer<E, M>, Output = Integer<E, I>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
M: Magnitude,
impl<E, I, M> OutputMode<dyn ShlChecked<Integer<E, M>, Output = Integer<E, I>> + 'static> for Integer<E, I>where
E: Environment,
I: IntegerType,
M: Magnitude,
type Case = (Mode, Mode)
fn output_mode(
case: &<Integer<E, I> as OutputMode<dyn ShlChecked<Integer<E, M>, Output = Integer<E, I>> + 'static>>::Case
) -> Mode
fn output_mode(
case: &<Integer<E, I> as OutputMode<dyn ShlChecked<Integer<E, M>, Output = Integer<E, I>> + 'static>>::Case
) -> Mode
Returns the mode of the output.
Implementations on Foreign Types
impl<E, I, M> ShlChecked<Integer<E, M>> for Integer<E, I>where
E: Environment,
I: IntegerType,
M: Magnitude,
impl<E, I, M> ShlChecked<Integer<E, M>> for Integer<E, I>where
E: Environment,
I: IntegerType,
M: Magnitude,
fn shl_checked(
&self,
n: &Integer<E, M>
) -> <Integer<E, I> as ShlChecked<Integer<E, M>>>::Output
fn shl_checked(
&self,
n: &Integer<E, M>
) -> <Integer<E, I> as ShlChecked<Integer<E, M>>>::Output
Shifts self
to the left by n
bits.