Skip to main content

take_bool_arg

Function take_bool_arg 

Source
pub fn take_bool_arg(
    args: &mut Map<String, Value>,
    key: &str,
    default: bool,
) -> bool
Expand description

Read an optional boolean argument from a method-arguments envelope, removing it from the map (bd:JMAP-ic0j.39).

Returns default if key is absent, if the value is not a boolean, or if the value is Value::Null. Mirrors the semantics of bool_arg but consumes the entry from args. Matches the canonical mail-server “remove-as-we-go” parsing pattern.