CallableAll
Consumes a cursor with a concrete exact-item safe predicate.
Module std.iteration
import std.iteration;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
All
pub fn All<T, I, C>(mut Cursor: I, mut Predicate: C) -> bool
where T: Copyable where I: TypedIterator<T>
where C: UnaryCallable<T, bool>, MovableConsumes a cursor with a concrete exact-item safe predicate.
Examines items in order, retaining each optional during invocation. Stops on the first rejection or exhaustion; empty input returns true. Owning discarded items use ordinary destruction; returned carriers preserve exact ownership/access. The terminal owns the callback and adds no allocation or synchronization. Callback costs and borrowed backing validity remain its contract; no capture backing is retained implicitly. T: Exact Copyable input item type. I: Structural source cursor, inferred from Cursor. C: Concrete Movable safe predicate, inferred from Predicate. Cursor: Owned traversal state; explicitly move non-Copy named cursors. Predicate: Owned environment; borrowed captures must survive traversal. Return: Short-circuit boolean result; unexamined items remain unpulled. Warning: Infinite traversal without a decisive predicate result never terminates.
All
pub fn All<T, I, C>(mut Cursor: I, mut Predicate: C) -> bool
where T: Movable where I: TypedIterator<T>
where C: BorrowingUnaryCallable<T, bool>, MovableConsumes a cursor with a concrete readonly-borrowing safe predicate.
Examines items in order, retaining each optional during invocation. Stops on the first rejection or exhaustion; empty input returns true. Owning discarded items use ordinary destruction; returned carriers preserve exact ownership/access. The terminal owns the callback and adds no allocation or synchronization. Callback costs and borrowed backing validity remain its contract; no capture backing is retained implicitly. T: Exact Movable input item type. I: Structural source cursor, inferred from Cursor. C: Concrete Movable safe predicate, inferred from Predicate. Cursor: Owned traversal state; explicitly move non-Copy named cursors. Predicate: Owned environment; borrowed captures must survive traversal. Return: Short-circuit boolean result; unexamined items remain unpulled. Warning: Infinite traversal without a decisive predicate result never terminates.