[][src]Trait ni::executor::primary::Primary

pub trait Primary: Sized {
    type Bytes: Borrow<[u8]>;

    const SIZE: usize;

    fn to_bytes(&self) -> Self::Bytes;
fn from_bytes(bytes: Self::Bytes) -> Self;
fn from_slice(slice: &[u8]) -> Self;
fn zero() -> Self;
fn one() -> Self;
fn from_word(val: UWord) -> Self; }

Associated Types

Loading content...

Associated Constants

const SIZE: usize

Loading content...

Required methods

fn to_bytes(&self) -> Self::Bytes

fn from_bytes(bytes: Self::Bytes) -> Self

fn from_slice(slice: &[u8]) -> Self

fn zero() -> Self

fn one() -> Self

fn from_word(val: UWord) -> Self

Loading content...

Implementations on Foreign Types

impl Primary for u8[src]

type Bytes = [u8; 1]

impl Primary for i8[src]

type Bytes = [u8; 1]

impl Primary for u16[src]

type Bytes = [u8; 2]

impl Primary for i16[src]

type Bytes = [u8; 2]

impl Primary for u32[src]

type Bytes = [u8; 4]

impl Primary for i32[src]

type Bytes = [u8; 4]

impl Primary for u64[src]

type Bytes = [u8; 8]

impl Primary for i64[src]

type Bytes = [u8; 8]

impl Primary for u128[src]

type Bytes = [u8; 16]

impl Primary for i128[src]

type Bytes = [u8; 16]

impl Primary for usize[src]

type Bytes = [u8; 8]

impl Primary for isize[src]

type Bytes = [u8; 8]

impl Primary for f32[src]

type Bytes = [u8; 4]

impl Primary for f64[src]

type Bytes = [u8; 8]

Loading content...

Implementors

Loading content...