noir_protobuf

Function decode_vec_map_wrap

Source
pub fn decode_vec_map_wrap<R, T, F>(
    rs: &[R],
    msg: &'static str,
    f: F,
) -> Result<Vec<T>>
where F: Fn(&R) -> Result<T>,
Expand description

Decode repeated items by mapping a function over them, attaching an error message if it fails. Useful when a lambda needs to be applied before we can use one of the type class methods.