pub trait FieldType: Sized {
    const IS_SIGNED: bool;
    const TOTAL_BIT_SIZE: usize = _;

    // Required methods
    fn get_bit(&self, bit: usize) -> bool;
    fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self;

    // Provided method
    fn set_field(&self, field: &mut [u8], bit_range: (usize, usize)) { ... }
}

Required Associated Constants§

Provided Associated Constants§

Required Methods§

source

fn get_bit(&self, bit: usize) -> bool

source

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

Provided Methods§

source

fn set_field(&self, field: &mut [u8], bit_range: (usize, usize))

Implementations on Foreign Types§

source§

impl FieldType for i128

source§

const IS_SIGNED: bool = true

source§

fn get_bit(&self, bit: usize) -> bool

source§

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

source§

impl FieldType for i32

source§

const IS_SIGNED: bool = true

source§

fn get_bit(&self, bit: usize) -> bool

source§

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

source§

impl FieldType for u128

source§

const IS_SIGNED: bool = false

source§

fn get_bit(&self, bit: usize) -> bool

source§

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

source§

impl FieldType for u16

source§

const IS_SIGNED: bool = false

source§

fn get_bit(&self, bit: usize) -> bool

source§

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

source§

impl FieldType for u32

source§

const IS_SIGNED: bool = false

source§

fn get_bit(&self, bit: usize) -> bool

source§

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

source§

impl FieldType for u64

source§

const IS_SIGNED: bool = false

source§

fn get_bit(&self, bit: usize) -> bool

source§

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

source§

impl FieldType for u8

source§

const IS_SIGNED: bool = false

source§

fn get_bit(&self, bit: usize) -> bool

source§

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

source§

impl FieldType for i16

source§

const IS_SIGNED: bool = true

source§

fn get_bit(&self, bit: usize) -> bool

source§

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

source§

impl FieldType for bool

source§

const IS_SIGNED: bool = false

source§

fn get_bit(&self, _bit: usize) -> bool

source§

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

source§

impl FieldType for i64

source§

const IS_SIGNED: bool = true

source§

fn get_bit(&self, bit: usize) -> bool

source§

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

source§

impl FieldType for i8

source§

const IS_SIGNED: bool = true

source§

fn get_bit(&self, bit: usize) -> bool

source§

fn get_field(field: &[u8], bit_range: (usize, usize)) -> Self

Implementors§