Skip to main content

try_read_consume_pod

Function try_read_consume_pod 

Source
pub fn try_read_consume_pod<T>(window: &mut &[u8]) -> Result<T>
Expand description

Checked variant of read_consume_pod: returns Err instead of panicking when the window is shorter than size_of::<T>(). Use for payload-derived (untrusted) windows.