bitwarden_core

Macro require

Source
macro_rules! require {
    ($val:expr) => { ... };
}
Expand description

This macro is used to require that a value is present or return an error otherwise. It is equivalent to using val.ok_or(Error::MissingFields)?, but easier to use and with a more descriptive error message. Note that this macro will return early from the function if the value is not present.