Function assembly_core::buffer::cast

source ·
pub fn cast<T: MinimallyAligned>(buffer: &[u8], offset: u32) -> &T
Expand description

Cast a buffer to a reference

§Panics

  • If the [offset, offset + size_of::<Self>] is not contained by the buffer