Trait logos::source::Chunk

source ·
pub trait Chunk<'source>: Sized + Copy + PartialEq + Eq {
    const SIZE: usize;

    unsafe fn from_ptr(ptr: *const u8) -> Self;
}
Expand description

A fixed, statically sized chunk of data that can be read from the Source.

This is implemented for u8, as well as byte arrays &[u8; 1] to &[u8; 32].

Required Associated Constants§

Size of the chunk being accessed in bytes.

Required Methods§

Create a chunk from a raw byte pointer.

Implementations on Foreign Types§

Implementors§