Trait subtle::ConditionallySwappable
[−]
[src]
pub trait ConditionallySwappable {
fn conditional_swap(&mut self, other: &mut Self, choice: Mask);
}Trait for things which are conditionally swappable in constant time.
Required Methods
fn conditional_swap(&mut self, other: &mut Self, choice: Mask)
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.