Trait Square

Source
pub trait Square {
    type Output;

    // Required method
    fn square(self) -> Self::Output;
}
Expand description

Squares a number.

Required Associated Types§

Required Methods§

Source

fn square(self) -> Self::Output

Implementations on Foreign Types§

Source§

impl Square for f32

Source§

fn square(self) -> f32

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = f32

Source§

impl Square for f64

Source§

fn square(self) -> f64

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = f64

Source§

impl Square for i8

Source§

fn square(self) -> i8

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = i8

Source§

impl Square for i16

Source§

fn square(self) -> i16

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = i16

Source§

impl Square for i32

Source§

fn square(self) -> i32

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = i32

Source§

impl Square for i64

Source§

fn square(self) -> i64

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = i64

Source§

impl Square for i128

Source§

fn square(self) -> i128

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = i128

Source§

impl Square for isize

Source§

fn square(self) -> isize

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = isize

Source§

impl Square for u8

Source§

fn square(self) -> u8

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = u8

Source§

impl Square for u16

Source§

fn square(self) -> u16

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = u16

Source§

impl Square for u32

Source§

fn square(self) -> u32

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = u32

Source§

impl Square for u64

Source§

fn square(self) -> u64

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = u64

Source§

impl Square for u128

Source§

fn square(self) -> u128

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = u128

Source§

impl Square for usize

Source§

fn square(self) -> usize

Squares a number.

$f(x) = x^2$.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

type Output = usize

Implementors§