Trait PointType

Source
pub trait PointType<T> {
    // Required methods
    fn decode(data: Vec<u16>) -> T;
    fn encode(data: T) -> Vec<u16>;
}

Required Methods§

Source

fn decode(data: Vec<u16>) -> T

Source

fn encode(data: T) -> Vec<u16>

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

Source§

fn decode(data: Vec<u16>) -> f32

Source§

fn encode(data: f32) -> Vec<u16>

Source§

impl PointType<i16> for i16

Source§

fn decode(data: Vec<u16>) -> i16

Source§

fn encode(data: i16) -> Vec<u16>

Source§

impl PointType<i32> for i32

Source§

fn decode(data: Vec<u16>) -> i32

Source§

fn encode(data: i32) -> Vec<u16>

Source§

impl PointType<i64> for i64

Source§

fn decode(data: Vec<u16>) -> i64

Source§

fn encode(data: i64) -> Vec<u16>

Source§

impl PointType<u16> for u16

Source§

fn decode(data: Vec<u16>) -> u16

Source§

fn encode(data: u16) -> Vec<u16>

Source§

impl PointType<u32> for u32

Source§

fn decode(data: Vec<u16>) -> u32

Source§

fn encode(data: u32) -> Vec<u16>

Source§

impl PointType<u64> for u64

Source§

fn decode(data: Vec<u16>) -> u64

Source§

fn encode(data: u64) -> Vec<u16>

Source§

impl PointType<u128> for u128

Source§

fn decode(data: Vec<u16>) -> u128

Source§

fn encode(data: u128) -> Vec<u16>

Source§

impl PointType<String> for String

Implementors§