pub struct Choice(/* private fields */);Expand description
Constant time boolean
This implementation uses a u64 under the hood, but it’s never exposed and only used through abstraction that push toward more constant time operations.
Choice can be combined with simple And operation.
Choice can be converted back to a boolean operations, although once this is done, the operation will likely be non-constant.
Implementations§
Trait Implementations§
impl Copy for Choice
Auto Trait Implementations§
impl Freeze for Choice
impl RefUnwindSafe for Choice
impl Send for Choice
impl Sync for Choice
impl Unpin for Choice
impl UnsafeUnpin for Choice
impl UnwindSafe for Choice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more