pub fn read_value(
reader: &mut Reader<'_>,
catalog: &Catalog,
ty: &Type,
mode: Mode,
limits: &Limits,
) -> Result<Value, DecodeError>Expand description
Reads one value of ty from reader, in mode and within limits,
leaving the reader just past it: for a value inside a larger message.
Whether ty can be decoded at all in mode is judged first, before
any byte is read, as crate::decodable judges it.
§Errors
A DecodeError when ty cannot be decoded in mode, or the bytes
that follow do not begin with a value’s encoding of it within limits.