Module dock_crypto_utils::iter

source ·

Functions§

  • Maps supplied iterator and attempts to pair each successfully validated item with a corresponding item from the slice. Validation errors will be propagated without looking at them.
  • Maps supplied iterator and attempts to pair each item with an item from the slice which has provided index. Returns Err containing an invalid index in case slice length is exceeded.
  • Plucks items from the supplied iterator corresponding to missed indices. This function implies that both iterators are sorted.
  • Skips up to n elements from the iterator using supplied random generator.
  • Ensures that the given iterator satisfies provided validator for each item. The supplied option will be modified to V::Failure in case of failure, and iteration will be aborted.
  • Ensures that the given iterator satisfies provided validator for each item. In case of an error, Err(V::Failure) will be emitted.