pub fn decode_inline_resource(bytes: &[u8]) -> Option<(&str, &[u8], &[u8])>
Expand description

Read an InlineResource’s data from its binary form in memory.

Examples

let resource = InlineResource::new(*b"Name", *b"Some Value");
let bytes = resource.as_bytes();

let (name, value, rest) = decode_inline_resource(bytes).unwrap();

assert_eq!(name, "Name");
assert_eq!(value, b"Some Value");
assert!(rest.is_empty());