pub trait ConstIsqrt: Sized + ConstZero {
// Required methods
fn isqrt(self) -> Self;
fn checked_isqrt(self) -> Option<Self>;
}Expand description
Const-compatible integer square root for unsigned integers.
Returns the largest integer r such that r * r <= self.
Required Methods§
Sourcefn checked_isqrt(self) -> Option<Self>
fn checked_isqrt(self) -> Option<Self>
Returns the integer square root of self.
For unsigned types, this always returns Some. The checked variant
exists for API consistency with signed types where negative values
would return None.
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.