Skip to main content

optional_bool_opt

Function optional_bool_opt 

Source
pub fn optional_bool_opt(
    input: &Value,
    field: &str,
) -> Result<Option<bool>, ToolError>
Expand description

Helper to extract an optional bool that has no default.

None means the caller did not supply the field; a wrong type is an error. Use this where “unset” is itself meaningful — an authority declaration that is dropped instead of read is a restriction that silently evaporates.