Trait MemoryWidthExt

Source
pub trait MemoryWidthExt:
    Debug
    + Copy
    + Clone
    + Eq
    + PartialEq
    + Hash
    + Ord
    + PartialOrd
    + Display
    + Into<u64> {
    const MAGIC: u64;

    // Required method
    fn nom_parse_fn<I>(
        endianness: Endianness,
    ) -> fn(I) -> IResult<I, Self, VerboseError<I>>
       where I: Slice<RangeFrom<usize>> + InputIter<Item = u8> + InputLength;
}
Expand description

Trait to represent memory widths. Currently just 32 or 64 bit. This implements Into so if we ever move beyond 64 bit systems this code will have to change to Into or whatever the next thing is.

Required Associated Constants§

Required Methods§

Source

fn nom_parse_fn<I>( endianness: Endianness, ) -> fn(I) -> IResult<I, Self, VerboseError<I>>
where I: Slice<RangeFrom<usize>> + InputIter<Item = u8> + InputLength,

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 MemoryWidthExt for u32

Source§

const MAGIC: u64 = 18_405_209_413_953_933_953u64

Source§

fn nom_parse_fn<I>( endianness: Endianness, ) -> fn(I) -> IResult<I, Self, VerboseError<I>>
where I: Slice<RangeFrom<usize>> + InputIter<Item = u8> + InputLength,

Source§

impl MemoryWidthExt for u64

Source§

const MAGIC: u64 = 18_405_209_413_953_942_145u64

Source§

fn nom_parse_fn<I>( endianness: Endianness, ) -> fn(I) -> IResult<I, Self, VerboseError<I>>
where I: Slice<RangeFrom<usize>> + InputIter<Item = u8> + InputLength,

Implementors§