MCPcopy Index your code
hub / github.com/assert-rs/predicates-rs

github.com/assert-rs/predicates-rs @v3.1.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.1.4 ↗ · + Follow
210 symbols 320 edges 30 files 67 documented · 32%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

predicates-rs

An implementation of boolean-valued predicate functions in Rust.

Documentation License Crates.io

Changelog

Usage

First, add this to your Cargo.toml:

[dependencies]
predicates = "3.1.4"

Next, add this to your crate:

extern crate predicates;

use predicates::prelude::*;

For more information on using predicates, look at the documentation

License

Licensed under either of

at your option.

Credits

Big thanks to futures-rs, whose slick API design informed a lot of decisions made on the API design of this library.

Extension points exported contracts — how you extend this code

PredicateReflection (Interface)
Introspect the state of a `Predicate`. [29 implementers]
crates/core/src/reflection.rs
PredicateNameExt (Interface)
`Predicate` extension that adds naming predicate expressions. [1 implementers]
src/name.rs
PredicateBooleanExt (Interface)
`Predicate` extension that adds boolean logic. [1 implementers]
src/boolean.rs
PredicateBoxExt (Interface)
`Predicate` extension for boxing a `Predicate`. [1 implementers]
src/boxed.rs
PredicateFileContentExt (Interface)
`Predicate` extension adapting a `slice` Predicate. [1 implementers]
src/path/fc.rs
PredicateStrExt (Interface)
`Predicate` extension adapting a `str` Predicate. [1 implementers]
src/str/adapters.rs
CaseTreeExt (Interface)
Render `Self` as a displayable tree. [1 implementers]
crates/tree/src/lib.rs
Predicate (Interface)
Trait for generically evaluating a type against a dynamically created predicate function. The exact meaning of `eval` d [32 …
crates/core/src/core.rs

Core symbols most depended-on inside this repo

add_product
called by 27
crates/core/src/reflection.rs
default_find_case
called by 17
src/utils.rs
add_child
called by 10
crates/core/src/reflection.rs
find_case
called by 4
crates/core/src/core.rs
tree
called by 4
crates/tree/src/lib.rs
read_file
called by 3
src/path/fs.rs
eval
called by 2
src/ord.rs
eq
called by 2
src/ord.rs

Shape

Method 114
Class 43
Function 42
Interface 8
Enum 3

Languages

Rust100%

Modules by API surface

crates/core/src/reflection.rs22 symbols
src/boolean.rs20 symbols
src/str/basics.rs14 symbols
src/ord.rs13 symbols
src/path/ft.rs11 symbols
src/boxed.rs11 symbols
src/str/adapters.rs10 symbols
src/iter.rs10 symbols
src/path/fs.rs9 symbols
src/float/close.rs9 symbols
src/str/regex.rs8 symbols
src/path/fc.rs8 symbols

For agents

$ claude mcp add predicates-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact