TimerOps

Trait TimerOps 

Source
pub trait TimerOps: Copy {
    const MAX: Self;
    const ONE: Self;

    // Required methods
    fn xor(self, other: Self) -> Self;
    fn and(self, other: Self) -> Self;
    fn add(self, other: Self) -> Self;
    fn left_shift(self, amount: u32) -> Self;
}
Expand description

Operations a type has to support in order to be used as the return value of calculate_now.

Required Associated Constants§

Source

const MAX: Self

All bits set to 1.

Source

const ONE: Self

The lowest bit set to 1.

Required Methods§

Source

fn xor(self, other: Self) -> Self

The ^ operation.

Source

fn and(self, other: Self) -> Self

The & operation.

Source

fn add(self, other: Self) -> Self

The + operation.

Source

fn left_shift(self, amount: u32) -> Self

The << operation.

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 TimerOps for u16

Source§

const MAX: Self = Self::MAX

Source§

const ONE: Self = 1

Source§

fn xor(self, other: Self) -> Self

Source§

fn and(self, other: Self) -> Self

Source§

fn add(self, other: Self) -> Self

Source§

fn left_shift(self, amount: u32) -> Self

Source§

impl TimerOps for u32

Source§

const MAX: Self = Self::MAX

Source§

const ONE: Self = 1

Source§

fn xor(self, other: Self) -> Self

Source§

fn and(self, other: Self) -> Self

Source§

fn add(self, other: Self) -> Self

Source§

fn left_shift(self, amount: u32) -> Self

Source§

impl TimerOps for u64

Source§

const MAX: Self = Self::MAX

Source§

const ONE: Self = 1

Source§

fn xor(self, other: Self) -> Self

Source§

fn and(self, other: Self) -> Self

Source§

fn add(self, other: Self) -> Self

Source§

fn left_shift(self, amount: u32) -> Self

Source§

impl TimerOps for u128

Source§

const MAX: Self = Self::MAX

Source§

const ONE: Self = 1

Source§

fn xor(self, other: Self) -> Self

Source§

fn and(self, other: Self) -> Self

Source§

fn add(self, other: Self) -> Self

Source§

fn left_shift(self, amount: u32) -> Self

Implementors§