Function hotg_rune_core::decode_inline_resource
source · [−]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());