requisite 0.1.0

Data-handling requirements encoded in Rust types.
Documentation
//! # requisite
//!
//! `requisite` encodes data-handling requirements in types:
//!
//! - [`trust`] routes external input through a named sanitizer before trusted
//!   sinks receive it.
//! - [`confidence`] maps probabilities to action tiers and issues a
//!   [`Certain`](confidence::Certain) token for the highest tier.
//! - [`fresh`] checks TTLs at read time and binds operation-scoped values to
//!   their closure.
//!
//! A function states its requirement in its parameter type. Callers satisfy
//! that requirement through the corresponding transition or check.
//!
//! ## Enforcement
//!
//! Trust tags, confidence tiers, proof tokens, and scoped lifetimes are checked
//! by the compiler. TTLs and confidence thresholds are evaluated at runtime.
//!
//! Runtime checks return types that carry their result forward.
//! [`Confident::gate`](confidence::Confident::gate), for example, returns a tier
//! whose highest variant includes a [`Certain`](confidence::Certain) token.
//!
//! ## Guides
//!
//! - [Getting started](https://github.com/slepp/requisite/blob/main/docs/getting-started.md)
//! - [Trust transitions](https://github.com/slepp/requisite/blob/main/docs/trust.md)
//! - [Confidence gates](https://github.com/slepp/requisite/blob/main/docs/confidence.md)
//! - [Freshness](https://github.com/slepp/requisite/blob/main/docs/freshness.md)
//! - [Integration patterns](https://github.com/slepp/requisite/blob/main/docs/integration.md)

#![forbid(unsafe_code)]
#![warn(missing_docs)]

pub mod confidence;
pub mod fresh;
pub mod trust;

/// Common imports.
pub mod prelude {
    pub use crate::confidence::{
        Certain, Confident, Gate, InvalidConfidence, InvalidThresholds, Thresholds,
    };
    pub use crate::fresh::scoped::with_live;
    pub use crate::fresh::{Fresh, InvalidFetchTime, Stale, StaleValue};
    pub use crate::trust::{sanitize, try_sanitize, Tainted, Trusted, Untrusted};
}