//! Pipeline behavior chain construction.
use Arc;
use crate;
/// Build a chain of pipeline behaviors wrapping a terminal handler.
///
/// Behaviors are applied in Vec order: the first element is the outermost
/// (runs first on request, last on response). Reverse-fold constructs the
/// nested closure chain.