Function holochain::prelude::dependencies::kitsune_p2p_types::dependencies::lair_keystore_api::dependencies::hc_seed_bundle::dependencies::rmpv::decode::value::read_value_with_max_depth
pub fn read_value_with_max_depth<R>(
rd: &mut R,
max_depth: usize
) -> Result<Value, Error>where
R: Read,
Expand description
Attempts to read bytes from the given reader and interpret them as a Value
.
Errors
This function will return Error
on any I/O error while either reading or decoding a Value
.
All instances of ErrorKind::Interrupted
are handled by this function and the
underlying operation is retried.
Error::DepthLimitExceeded
is returned if this function recurses
max_depth
times. If the default MAX_DEPTH
is sufficient or you do not
need recursion depth checking for your data, consider using read_value
instead.