Skip to main content

CheckedSquareRoot

Trait CheckedSquareRoot 

Source
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§

Source

type Output

Output of the square root operation.

Required Methods§

Source

fn checked_sqrt(&self) -> CtOption<Self::Output>

Computes sqrt(self), returning none if no root exists.

Source

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§