[][src]Crate vec_drain_where

Provides an alternative implementation for Vec::drain_filter.

Import VecDrainWhereExt to extend Vec with an e_drain_where method which drains all elements where a predicate indicates it. The e_ prefix is to prevent name collision/confusion as drain_filter might be stabilized as drain_where. Also in difference to drain_filter this implementation doesn't run to completion when dropped, allowing stopping the draining from the outside (through combinators/for loop break) and is not prone to double panics/panics on drop.



Iterator for draining a vector conditionally.



Ext. trait adding e_drain_where to Vec