Trait Fixed

Source
pub trait Fixed:
    Default
    + Sized
    + Clone
    + Copy {
    type Wire: Sized;

    // Required methods
    fn from_wire(v: Self::Wire) -> Self;
    fn to_wire(self) -> Self::Wire;
}

Required Associated Types§

Required Methods§

Source

fn from_wire(v: Self::Wire) -> Self

Source

fn to_wire(self) -> Self::Wire

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

Source§

type Wire = u32

Source§

fn from_wire(v: Self::Wire) -> Self

Source§

fn to_wire(self) -> Self::Wire

Source§

impl Fixed for f64

Source§

type Wire = u64

Source§

fn from_wire(v: Self::Wire) -> Self

Source§

fn to_wire(self) -> Self::Wire

Source§

impl Fixed for i32

Source§

type Wire = u32

Source§

fn from_wire(v: Self::Wire) -> Self

Source§

fn to_wire(self) -> Self::Wire

Source§

impl Fixed for i64

Source§

type Wire = u64

Source§

fn from_wire(v: Self::Wire) -> Self

Source§

fn to_wire(self) -> Self::Wire

Source§

impl Fixed for u32

Source§

type Wire = u32

Source§

fn from_wire(v: Self::Wire) -> Self

Source§

fn to_wire(self) -> Self::Wire

Source§

impl Fixed for u64

Source§

type Wire = u64

Source§

fn from_wire(v: Self::Wire) -> Self

Source§

fn to_wire(self) -> Self::Wire

Implementors§