Trait CheckedSqrt

Source
pub trait CheckedSqrt: Sized {
    // Required method
    const fn checked_sqrt(self) -> Option<Self>;
}
Expand description

✅ Returns the square root of self, or None if self is negative.

§Panics

This function never panics.

Required Methods§

Source

const fn checked_sqrt(self) -> Option<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§