Skip to main content

effective_boolean_value_opt

Function effective_boolean_value_opt 

Source
pub fn effective_boolean_value_opt(
    value: Option<&XmlValue>,
) -> Result<bool, XPathError>
Expand description

Compute the effective boolean value with support for optional values.

This handles the case where a value may be absent (empty sequence).

§Arguments

  • value - Optional value to evaluate

§Returns

  • Ok(false) if value is None (empty sequence)
  • Ok(bool) the EBV of the value
  • Err(XPathError) if the type doesn’t support EBV