Skip to main content

Lane

Trait Lane 

Source
pub trait Lane: Copy + Default {
    // Required methods
    fn fit(value: i64) -> Option<Self>;
    fn wrap(value: i64) -> Self;
}
Expand description

An integer type a chunk can be decoded straight into. See decode_as.

Required Methods§

Source

fn fit(value: i64) -> Option<Self>

The value in this type, or None when it does not fit.

Source

fn wrap(value: i64) -> Self

The value in this type, for a value already known to fit.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Lane for i8

Source§

fn fit(value: i64) -> Option<Self>

Source§

fn wrap(value: i64) -> Self

Source§

impl Lane for i16

Source§

fn fit(value: i64) -> Option<Self>

Source§

fn wrap(value: i64) -> Self

Source§

impl Lane for i32

Source§

fn fit(value: i64) -> Option<Self>

Source§

fn wrap(value: i64) -> Self

Source§

impl Lane for i64

Source§

fn fit(value: i64) -> Option<Self>

Source§

fn wrap(value: i64) -> Self

Source§

impl Lane for u8

Source§

fn fit(value: i64) -> Option<Self>

Source§

fn wrap(value: i64) -> Self

Source§

impl Lane for u16

Source§

fn fit(value: i64) -> Option<Self>

Source§

fn wrap(value: i64) -> Self

Source§

impl Lane for u32

Source§

fn fit(value: i64) -> Option<Self>

Source§

fn wrap(value: i64) -> Self

Source§

impl Lane for u64

Source§

fn fit(value: i64) -> Option<Self>

Source§

fn wrap(value: i64) -> Self

Implementors§