Skip to main content

CtAssign

Trait CtAssign 

Source
pub trait CtAssign<Rhs: ?Sized = Self> {
    // Required method
    fn ct_assign(&mut self, src: &Rhs, choice: Choice);
}
Expand description

Constant-time conditional assignment: assign a given value to another based on a Choice.

This crate provides built-in implementations for the following types:

Required Methods§

Source

fn ct_assign(&mut self, src: &Rhs, choice: Choice)

Conditionally assign src to self if choice is Choice::TRUE.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CtAssign for Choice

Available on crate feature subtle only.
Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroI8

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroI16

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroI32

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroI64

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroI128

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroIsize

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroU8

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroU16

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroU32

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroU64

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroU128

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for NonZeroUsize

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for Ordering

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for i8

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for i16

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for i32

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for i64

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for i128

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for isize

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for u8

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for u16

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for u32

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for u64

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for u128

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl CtAssign for usize

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl<T, const N: usize> CtAssign for [T; N]
where T: CtAssignSlice,

Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Source§

impl<T: CtAssignSlice> CtAssign for [T]

Source§

fn ct_assign(&mut self, src: &[T], choice: Choice)

Source§

impl<T> CtAssign for CtOption<T>

Available on crate feature subtle only.
Source§

fn ct_assign(&mut self, rhs: &Self, choice: Choice)

Implementors§

Source§

impl CtAssign for ctutils::Choice

Source§

impl<T: CtAssign> CtAssign for ctutils::CtOption<T>