Skip to main content

try_be_u16

Function try_be_u16 

Source
pub fn try_be_u16(data: &[u8], off: usize) -> Option<u16>
Expand description

Read a u16 at off; None if out of range. Never panics. Use when 0 must be distinguished from absent/truncated.