Trait TxOperations

Source
pub trait TxOperations: Copy {
    // Required methods
    fn zero() -> Self;
    fn tx_mul<const SHIFT: i32>(self, mul: i32) -> Self;
    fn rshift1(self) -> Self;
    fn add(self, b: Self) -> Self;
    fn sub(self, b: Self) -> Self;
    fn add_avg(self, b: Self) -> Self;
    fn sub_avg(self, b: Self) -> Self;

    // Provided method
    fn copy_fn(self) -> Self { ... }
}

Required Methods§

Source

fn zero() -> Self

Source

fn tx_mul<const SHIFT: i32>(self, mul: i32) -> Self

Source

fn rshift1(self) -> Self

Source

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

Source

fn sub(self, b: Self) -> Self

Source

fn add_avg(self, b: Self) -> Self

Source

fn sub_avg(self, b: Self) -> Self

Provided Methods§

Source

fn copy_fn(self) -> 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 TxOperations for i32

Source§

fn zero() -> Self

Source§

fn tx_mul<const SHIFT: i32>(self, mul: i32) -> Self

Source§

fn rshift1(self) -> Self

Source§

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

Source§

fn sub(self, b: Self) -> Self

Source§

fn add_avg(self, b: Self) -> Self

Source§

fn sub_avg(self, b: Self) -> Self

Implementors§