Skip to main content

Root

Trait Root 

Source
pub trait Root {
    type Output;

    // Required method
    fn nth_root(&self, n: u32) -> Self::Output;

    // Provided methods
    fn sqrt(&self) -> Self::Output { ... }
    fn cbrt(&self) -> Self::Output { ... }
}

Required Associated Types§

Required Methods§

Source

fn nth_root(&self, n: u32) -> Self::Output

Provided Methods§

Source

fn sqrt(&self) -> Self::Output

Source

fn cbrt(&self) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Root for f32

Source§

type Output = f32

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for f64

Source§

type Output = f64

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for i8

Source§

type Output = i8

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for i16

Source§

type Output = i16

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for i32

Source§

type Output = i32

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for i64

Source§

type Output = i64

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for i128

Source§

type Output = i128

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for isize

Source§

type Output = isize

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for u8

Source§

type Output = u8

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for u16

Source§

type Output = u16

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for u32

Source§

type Output = u32

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for u64

Source§

type Output = u64

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for u128

Source§

type Output = u128

Source§

fn nth_root(&self, n: u32) -> Self::Output

Source§

impl Root for usize

Source§

type Output = usize

Source§

fn nth_root(&self, n: u32) -> Self::Output

Implementors§