[][src]Trait subtle::ConditionallyNegatable

pub trait ConditionallyNegatable {
    fn conditional_negate(&mut self, choice: Choice);
}

A type which can be conditionally negated in constant time.

Note

A generic implementation of ConditionallyNegatable is provided for types which are ConditionallyNegatable + Neg.

Required methods

fn conditional_negate(&mut self, choice: Choice)

Negate self if choice == Choice(1); otherwise, leave it unchanged.

This function should execute in constant time.

Loading content...

Implementors

impl<T> ConditionallyNegatable for T where
    T: ConditionallyAssignable,
    &'a T: Neg<Output = T>, 
[src]

Loading content...