Function from_reader

Source
pub fn from_reader<T, R>(reader: R) -> Result<T, Error<<R as Read>::Error>>
where T: DeserializeOwned, R: Read, <R as Read>::Error: Debug,
Expand description

Deserializes as CBOR from a type with impl ciborium_io::Read using a 4KB buffer on the stack.

If you want to deserialize faster at the cost of more memory, consider using from_reader_with_buffer with a larger buffer, for example 64KB.