Skip to main content

IntegerCubeRoot

Trait IntegerCubeRoot 

Source
pub trait IntegerCubeRoot {
    // Required method
    fn integer_cbrt_checked(&self) -> Option<Self>
       where Self: Sized;

    // Provided method
    fn integer_cbrt(&self) -> Self
       where Self: Sized { ... }
}
Expand description

A trait implementing integer cube root.

Required Methods§

Source

fn integer_cbrt_checked(&self) -> Option<Self>
where Self: Sized,

Find the integer cube root, returning None if the number is negative (this can never happen for unsigned types).

Provided Methods§

Source

fn integer_cbrt(&self) -> Self
where Self: Sized,

Find the integer cube root.

§Panics

For negative numbers (i family) this function will panic on negative input

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§