# Logical Expressions

A library for working with logical expressions in Rust.

## Features

- Representing logical expressions using the `LogicalExpression` enum (supports `And` lists, `Or` lists and single conditions)
- Support for custom types to represent conditions
- Parsing logical expressions from strings with proper error handling, optionally with a custom condition or sub-expression parser (`parse_with`, `parse_with_expression`)
- 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:

```rust
use logical_expressions::LogicalExpression;

let expression: LogicalExpression<String> = LogicalExpression::parse("a & (b | c)").unwrap();
let expanded = expression.expand();
println!("{expanded:?}");
```

This will output:

```
[["a", "b"], ["a", "c"]]
```

## Documentation

For more detailed information and examples, please refer to the [API documentation](https://docs.rs/logical-expressions).
