noir_protobuf

Function decode_oneof_map

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

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