[][src]Trait allsorts::binary::read::ReadUnchecked

pub trait ReadUnchecked<'a> {
    type HostType: Sized;

    const SIZE: usize;

    unsafe fn read_unchecked(ctxt: &mut ReadCtxt<'a>) -> Self::HostType;
}

Read will always succeed if sufficient bytes are available.

Associated Types

Loading content...

Associated Constants

const SIZE: usize

The number of bytes consumed by read_unchecked.

Loading content...

Required methods

unsafe fn read_unchecked(ctxt: &mut ReadCtxt<'a>) -> Self::HostType

Must read exactly SIZE bytes. Unsafe as it avoids prohibitively expensive per-byte bounds checking.

Loading content...

Implementations on Foreign Types

impl<'a, T1, T2> ReadUnchecked<'a> for (T1, T2) where
    T1: ReadUnchecked<'a>,
    T2: ReadUnchecked<'a>, 
[src]

type HostType = (T1::HostType, T2::HostType)

impl<'a, T1, T2, T3> ReadUnchecked<'a> for (T1, T2, T3) where
    T1: ReadUnchecked<'a>,
    T2: ReadUnchecked<'a>,
    T3: ReadUnchecked<'a>, 
[src]

type HostType = (T1::HostType, T2::HostType, T3::HostType)

Loading content...

Implementors

impl<'a> ReadUnchecked<'a> for I16Be[src]

type HostType = i16

impl<'a> ReadUnchecked<'a> for I32Be[src]

type HostType = i32

impl<'a> ReadUnchecked<'a> for I64Be[src]

type HostType = i64

impl<'a> ReadUnchecked<'a> for I8[src]

type HostType = i8

impl<'a> ReadUnchecked<'a> for U16Be[src]

type HostType = u16

impl<'a> ReadUnchecked<'a> for U24Be[src]

type HostType = u32

impl<'a> ReadUnchecked<'a> for U32Be[src]

type HostType = u32

impl<'a> ReadUnchecked<'a> for U8[src]

type HostType = u8

impl<'a, T> ReadUnchecked<'a> for T where
    T: ReadFrom<'a>, 
[src]

type HostType = T

Loading content...