Skip to main content

predicates_core/
lib.rs

1// Copyright (c) 2018 The predicates-rs Project Developers.
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// http://www.apache.org/license/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9//! Composable first-order predicate trait.
10//!
11//! This library implements an interface to "predicates" - boolean-valued
12//! functions of one argument. This allows combinatorial logic to be created and
13//! assembled at runtime and then used one or more times for evaluating values.
14//! This sort of object is really useful when creating filters and checks that
15//! can be changed at runtime with user interaction - it allows a clean
16//! separation of concerns where the configuration code can be used to build up
17//! a predicate, and then that predicate can be given to the code that does the
18//! actual filtering without the filtering code knowing anything about user
19//! configuration. See the examples for how this can work.
20
21#![cfg_attr(docsrs, feature(doc_cfg))]
22#![warn(missing_docs)]
23#![warn(missing_debug_implementations)]
24
25mod core;
26pub use crate::core::*;
27pub mod reflection;
28
29#[doc = include_str!("../README.md")]
30#[cfg(doctest)]
31pub struct ReadmeDoctests;