[][src]Function libipld_cbor::decode::read_key

pub fn read_key<R: Read>(r: &mut R, key: &str) -> Result<()>

Reads bytes from a byte stream and matches them with the key. If the key doesn't match the read bytes it returns an UnexpectedKey error.