core_pb::util::moving_average

Trait Number

Source
pub trait Number:
    Copy
    + Add<Output = Self>
    + Sub<Output = Self> {
    const ZERO: Self;
    const ONE: Self;

    // Required method
    fn div_usize(self, by: usize) -> Self;
}

Required Associated Constants§

Source

const ZERO: Self

Source

const ONE: Self

Required Methods§

Source

fn div_usize(self, by: usize) -> 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.

Implementations on Foreign Types§

Source§

impl Number for f32

Source§

const ZERO: Self = 0f32

Source§

const ONE: Self = 1f32

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for f64

Source§

const ZERO: Self = 0f64

Source§

const ONE: Self = 1f64

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for i8

Source§

const ZERO: Self = 0i8

Source§

const ONE: Self = 1i8

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for i16

Source§

const ZERO: Self = 0i16

Source§

const ONE: Self = 1i16

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for i32

Source§

const ZERO: Self = 0i32

Source§

const ONE: Self = 1i32

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for i64

Source§

const ZERO: Self = 0i64

Source§

const ONE: Self = 1i64

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for i128

Source§

const ZERO: Self = 0i128

Source§

const ONE: Self = 1i128

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for u8

Source§

const ZERO: Self = 0u8

Source§

const ONE: Self = 1u8

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for u16

Source§

const ZERO: Self = 0u16

Source§

const ONE: Self = 1u16

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for u32

Source§

const ZERO: Self = 0u32

Source§

const ONE: Self = 1u32

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for u64

Source§

const ZERO: Self = 0u64

Source§

const ONE: Self = 1u64

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for u128

Source§

const ZERO: Self = 0u128

Source§

const ONE: Self = 1u128

Source§

fn div_usize(self, by: usize) -> Self

Source§

impl Number for Duration

Source§

const ZERO: Self = Self::ZERO

Source§

const ONE: Self

Source§

fn div_usize(self, by: usize) -> Self

Implementors§