Skip to main content

read_item

Function read_item 

Source
pub async fn read_item<R: AsyncRead + ?Sized>(
    reader: &mut R,
) -> Result<Vec<u8>, Error>
Expand description

Reads one complete, well-formed CBOR item from an async reader.

The returned bytes are exactly the item read from the stream. Text strings are validated as UTF-8 and nesting is bounded by the same recursion limit as the synchronous deserializer.