Crates.io | logical-expressions |
lib.rs | logical-expressions |
version | 0.1.3 |
created_at | 2025-02-22 19:02:27.704512+00 |
updated_at | 2025-03-17 17:13:42.475262+00 |
description | A library for working with logical expressions |
homepage | |
repository | https://gitlab.com/porky11/logical-expressions |
max_upload_size | |
id | 1565666 |
size | 26,323 |
A library for working with logical expressions in Rust.
LogicalExpression
enum (supports And
lists, Or
lists and single conditions)Here's an example of how to use the library:
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"]]
For more detailed information and examples, please refer to the API documentation.