Function der_parser::ber::ber_read_element_header
source · pub fn ber_read_element_header(i: &[u8]) -> BerResult<'_, Header<'_>>
Expand description
Read an object header
§Example
let bytes = &[0x02, 0x03, 0x01, 0x00, 0x01];
let (i, hdr) = ber_read_element_header(bytes).expect("could not read header");
assert_eq!(hdr.class(), Class::Universal);
assert_eq!(hdr.tag(), Tag::Integer);
assert_eq!(hdr.length(), Length::Definite(3));