//! The token-count cap.
//!
//! `docs/analysis/lucene-oak-analysis.md` §5, from
//! `analysis/miscellaneous/LimitTokenCountFilter.java` under
//! `LimitTokenCountAnalyzer(result, maxFieldLength)`, whose two-argument
//! constructor passes `consumeAllTokens = false`.
//!
//! That false is the whole of this module. On reaching its limit the
//! filter returns `false` **without pulling what is below it**, so the
//! source stops where it stands and `end()` reports the end of the last
//! token it scanned rather than the end of the value — which is why every
//! stage carries a per-token stop. A limit of zero empties the stream and
//! reports nothing at all, silently: 4.7.2 has no refusal here.
use Staged;
/// Keeps at most `limit` tokens, and takes the end state the source would
/// have reported there.
pub