pub trait CappedIterExt: Iterator + Sized {
// Provided method
fn capped(self, context: &'static str) -> CappedIter<Self> ⓘ { ... }
}Expand description
Extension trait providing capped on any iterator.
Provided Methods§
Sourcefn capped(self, context: &'static str) -> CappedIter<Self> ⓘ
fn capped(self, context: &'static str) -> CappedIter<Self> ⓘ
Caps iteration at MAX_ITERATION_COUNT, warning (via
crate::parser_warn!) only if the source actually had more items.
Prefer capped_iteration_limit when the collection length is cheaply
known; use this for lazy iterators where it is not.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".