# query.private.Predicate.validate_bool

- **Module:** query.private.Predicate
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/query/private.rs#L399
- **Page:** https://libtmux.org/reference/rs/query-private-predicate-validate_bool/

```
query.private.Predicate.validate_bool(self) -> Result<(), FilterExpressionError>
```

Validate that this predicate is a well-formed boolean predicate.

# Errors

Returns [`FilterExpressionErrorKind::UnknownOperator`] for another
scalar family and [`FilterExpressionErrorKind::InvalidStructure`]
for an invalid equality shape.

The [`crate::query::Filterable`] example executes this method in a
hand-written generated-code expansion.
