Logical Expressions
A library for working with logical expressions in Rust.
Features
- Representing logical expressions using the
LogicalExpression
enum (supportsAnd
lists,Or
lists and single conditions) - Support for custom types to represent conditions
- Parsing logical expressions from strings with proper error handling
- Expanding logical expressions into a list of lists, where the inner lists represent AND conditions and the outer lists represent OR conditions (DNF)
Quickstart
Here's an example of how to use the library:
use LogicalExpression;
let expression: = parse.unwrap;
let expanded = expression.expand;
println!;
This will output:
[["a", "b"], ["a", "c"]]
Documentation
For more detailed information and examples, please refer to the API documentation.