Trait subtle::ConditionallySwappable[][src]

pub trait ConditionallySwappable {
    fn conditional_swap(&mut self, other: &mut Self, choice: Choice);
}

A type which is conditionally swappable in constant time.

Required Methods

Conditionally swap self and other if choice == 1; otherwise, reassign both unto themselves.

Note

This trait is generically implemented for any type which implements ConditionallyAssignable + Copy.

Implementors