noir_protobuf

Function decode_some_map

Source
pub fn decode_some_map<R, T, F>(r: &Option<R>, f: F) -> Result<T>
where F: Fn(&R) -> Result<T>,
Expand description

Decode an optional item, returning an error if it’s None. Useful when a lambda needs to be applied before we can use one of the type class methods.