noir_protobuf

Function decode_some_map_wrap

Source
pub fn decode_some_map_wrap<R, T, F>(
    r: &Option<R>,
    msg: &'static str,
    f: F,
) -> Result<T>
where F: Fn(&R) -> Result<T>,
Expand description

Decode an optional item, attaching a field name to any errors. Useful when a lambda needs to be applied before we can use one of the type class methods.