Trait DecodeFrom

Source
pub trait DecodeFrom:
    Sized
    + Clone
    + Copy
    + PartialEq
    + PartialOrd
    + Add
    + AddAssign
    + Neg<Output = Self>
    + Sub<Output = Self> {
    // Required methods
    fn one() -> Self;
    fn zero() -> Self;
    fn maxval() -> Self;
    fn abs(&self) -> Self;
    fn saturating_add(&self, other: Self) -> Self;
    fn saturating_sub(&self, other: Self) -> Self;
    fn hard_bit(&self) -> bool;
}
Expand description

Trait for types that the min-sum decoder can operate with.

Implemented for i8, i16, i32, f32, and f64.

Required Methods§

Source

fn one() -> Self

1 in T

Source

fn zero() -> Self

0 in T

Source

fn maxval() -> Self

Maximum value T can represent

Source

fn abs(&self) -> Self

Absolute value of self

Source

fn saturating_add(&self, other: Self) -> Self

Saturating add

Source

fn saturating_sub(&self, other: Self) -> Self

Saturating sub

Source

fn hard_bit(&self) -> bool

Hard-information decoding for T, treating negative values as true

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 DecodeFrom for f32

Source§

fn one() -> f32

Source§

fn zero() -> f32

Source§

fn maxval() -> f32

Source§

fn abs(&self) -> f32

Source§

fn saturating_add(&self, other: Self) -> Self

Source§

fn saturating_sub(&self, other: Self) -> Self

Source§

fn hard_bit(&self) -> bool

Source§

impl DecodeFrom for f64

Source§

fn one() -> f64

Source§

fn zero() -> f64

Source§

fn maxval() -> f64

Source§

fn abs(&self) -> f64

Source§

fn saturating_add(&self, other: Self) -> Self

Source§

fn saturating_sub(&self, other: Self) -> Self

Source§

fn hard_bit(&self) -> bool

Source§

impl DecodeFrom for i8

Source§

fn one() -> i8

Source§

fn zero() -> i8

Source§

fn maxval() -> i8

Source§

fn abs(&self) -> i8

Source§

fn saturating_add(&self, other: Self) -> Self

Source§

fn saturating_sub(&self, other: Self) -> Self

Source§

fn hard_bit(&self) -> bool

Source§

impl DecodeFrom for i16

Source§

fn one() -> i16

Source§

fn zero() -> i16

Source§

fn maxval() -> i16

Source§

fn abs(&self) -> i16

Source§

fn saturating_add(&self, other: Self) -> Self

Source§

fn saturating_sub(&self, other: Self) -> Self

Source§

fn hard_bit(&self) -> bool

Source§

impl DecodeFrom for i32

Source§

fn one() -> i32

Source§

fn zero() -> i32

Source§

fn maxval() -> i32

Source§

fn abs(&self) -> i32

Source§

fn saturating_add(&self, other: Self) -> Self

Source§

fn saturating_sub(&self, other: Self) -> Self

Source§

fn hard_bit(&self) -> bool

Implementors§