pub struct ConstCtOption<T> { /* private fields */ }
Expand description
An equivalent of subtle::CtOption
usable in a const fn
context.
Implementations§
source§impl<T> ConstCtOption<T>
impl<T> ConstCtOption<T>
sourcepub const fn is_some(&self) -> ConstChoice
pub const fn is_some(&self) -> ConstChoice
Returns a true ConstChoice
if this value is Some
.
sourcepub const fn is_none(&self) -> ConstChoice
pub const fn is_none(&self) -> ConstChoice
Returns a true ConstChoice
if this value is None
.
source§impl<const LIMBS: usize> ConstCtOption<Uint<LIMBS>>
impl<const LIMBS: usize> ConstCtOption<Uint<LIMBS>>
source§impl ConstCtOption<NonZero<Limb>>
impl ConstCtOption<NonZero<Limb>>
source§impl<const SAT_LIMBS: usize, const UNSAT_LIMBS: usize> ConstCtOption<SafeGcdInverter<SAT_LIMBS, UNSAT_LIMBS>>
impl<const SAT_LIMBS: usize, const UNSAT_LIMBS: usize> ConstCtOption<SafeGcdInverter<SAT_LIMBS, UNSAT_LIMBS>>
sourcepub const fn expect(self, msg: &str) -> SafeGcdInverter<SAT_LIMBS, UNSAT_LIMBS>
pub const fn expect(self, msg: &str) -> SafeGcdInverter<SAT_LIMBS, UNSAT_LIMBS>
Returns the contained value, consuming the self
value.
§Panics
Panics if the value is none with a custom panic message provided by
msg
.
Trait Implementations§
source§impl<T: Clone> Clone for ConstCtOption<T>
impl<T: Clone> Clone for ConstCtOption<T>
source§fn clone(&self) -> ConstCtOption<T>
fn clone(&self) -> ConstCtOption<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for ConstCtOption<T>
impl<T: Debug> Debug for ConstCtOption<T>
source§impl<T> From<ConstCtOption<T>> for CtOption<T>
impl<T> From<ConstCtOption<T>> for CtOption<T>
source§fn from(value: ConstCtOption<T>) -> Self
fn from(value: ConstCtOption<T>) -> Self
Converts to this type from the input type.
source§impl<T> From<ConstCtOption<T>> for Option<T>
impl<T> From<ConstCtOption<T>> for Option<T>
source§fn from(value: ConstCtOption<T>) -> Self
fn from(value: ConstCtOption<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for ConstCtOption<T>where
T: Freeze,
impl<T> RefUnwindSafe for ConstCtOption<T>where
T: RefUnwindSafe,
impl<T> Send for ConstCtOption<T>where
T: Send,
impl<T> Sync for ConstCtOption<T>where
T: Sync,
impl<T> Unpin for ConstCtOption<T>where
T: Unpin,
impl<T> UnwindSafe for ConstCtOption<T>where
T: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)