[go: up one dir, main page]

Trait Pow

Source
pub trait Pow {
    // Required method
    fn pow(self, exp: u32) -> Self;
}
Expand description

Exponentiation.

Enables being generic over integers which can be exponentiated. Why must we do this, standard library?

Required Methods§

Source

fn pow(self, exp: u32) -> Self

Raises self to the power of exp.

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.

Implementations on Foreign Types§

Source§

impl Pow for i8

Source§

fn pow(self, exp: u32) -> Self

Source§

impl Pow for i16

Source§

fn pow(self, exp: u32) -> Self

Source§

impl Pow for i32

Source§

fn pow(self, exp: u32) -> Self

Source§

impl Pow for i64

Source§

fn pow(self, exp: u32) -> Self

Source§

impl Pow for isize

Source§

fn pow(self, exp: u32) -> Self

Source§

impl Pow for u8

Source§

fn pow(self, exp: u32) -> Self

Source§

impl Pow for u16

Source§

fn pow(self, exp: u32) -> Self

Source§

impl Pow for u32

Source§

fn pow(self, exp: u32) -> Self

Source§

impl Pow for u64

Source§

fn pow(self, exp: u32) -> Self

Source§

impl Pow for usize

Source§

fn pow(self, exp: u32) -> Self

Implementors§