feature-flag 0.1.0

Server-side feature flag evaluation for async Rust: targeting rules, sticky percentage rollouts, hot reload, zero RNG.
Documentation
//! # feature-flag
//!
//! Server-side feature flag evaluation for async Rust services.
//!
//! ## Design rules
//!
//! 1. **No external RNG.** Sticky bucketing is a SHA-256 of `(flag_id ‖ subject_id)`
//!    mod 100 — deterministic, no entropy source, no `rand` dep.
//! 2. **Tokio is assumed.** Hot reload uses `tokio::fs` + an async watcher.
//! 3. **Cheap clones.** The evaluator is `Arc`-shaped under the hood, so handing
//!    it to many tasks is free.
//! 4. **Snapshot for tests.** Build a [`FlagSet`] in code, drop it into a
//!    [`FlagEvaluator`], evaluate. No I/O required.
//!
//! ## Primitives
//!
//! - [`FlagSet`] — declarative collection of flags, deserialised from JSON.
//! - [`Flag`] — one named flag with default + ordered targeting [`Rule`]s.
//! - [`Rule`] — a `match_when` [`Predicate`] plus an outcome ([`Variant`] or
//!   percentage rollout).
//! - [`Predicate`] — small DSL of typed comparisons + `all_of` / `any_of` / `not`.
//! - [`Subject`] — the entity being evaluated (id + arbitrary attributes).
//! - [`FlagEvaluator`] — combines a [`FlagSet`] with a sticky-bucketing function.
//! - [`HotReloader`] — watches a JSON file for changes and atomically swaps the
//!   evaluator's [`FlagSet`].
//!
//! ## Composes with
//!
//! - **[reliability-toolkit-rs](https://github.com/mizcausevic-dev/reliability-toolkit-rs)** —
//!   wrap a rollout-controlled call in a circuit breaker + retry.
//! - **[slo-budget-tracker](https://github.com/mizcausevic-dev/slo-budget-tracker)** —
//!   if your SLO is burning, flip the flag to `default_off` from a remote
//!   config push.

#![warn(missing_docs)]
#![warn(rust_2018_idioms)]
#![warn(clippy::pedantic)]
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::missing_errors_doc)]
#![allow(clippy::missing_panics_doc)]
#![allow(clippy::must_use_candidate)]
#![allow(clippy::cast_possible_truncation)]
#![allow(clippy::cast_sign_loss)]
#![allow(clippy::doc_markdown)]
#![allow(clippy::unnecessary_debug_formatting)]

pub mod error;
pub mod evaluator;
pub mod hot_reload;
pub mod model;
pub mod predicate;
pub mod subject;

pub use error::FeatureFlagError;
pub use evaluator::{Evaluation, FlagEvaluator};
pub use hot_reload::HotReloader;
pub use model::{Flag, FlagSet, Rule, Variant};
pub use predicate::{Comparison, Predicate};
pub use subject::Subject;