pub trait CheckedSquareRoot: Sized {
type Output;
// Required methods
fn checked_sqrt(&self) -> CtOption<Self::Output>;
fn checked_sqrt_vartime(&self) -> Option<Self::Output>;
}Expand description
Support for calculating checked square roots.
Required Associated Types§
Required Methods§
Sourcefn checked_sqrt(&self) -> CtOption<Self::Output>
fn checked_sqrt(&self) -> CtOption<Self::Output>
Computes sqrt(self), returning none if no root exists.
Sourcefn checked_sqrt_vartime(&self) -> Option<Self::Output>
fn checked_sqrt_vartime(&self) -> Option<Self::Output>
Computes sqrt(self), returning none if no root exists.
Variable time with respect to self.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl CheckedSquareRoot for BoxedUint
Available on crate feature alloc only.
impl CheckedSquareRoot for BoxedUint
Available on crate feature
alloc only.