File: Drain.md

package info (click to toggle)
rust-coreutils 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 505,620 kB
  • sloc: ansic: 103,594; asm: 28,570; sh: 8,910; python: 5,581; makefile: 472; cpp: 97; javascript: 72
file content (17 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Draining Iteration

This structure iterates over a subset of a bit-vector, yielding each bit and
removing it completely from the source.

Each drain locks the bit-vector that created it until the drain is either
destroyed or forgotten. If a drain is leaked rather than being allowed to drop
normally, the source bit-vector is only guaranteed to have contents up to the
original start of the drain. All further contents are unspecified.

See [`BitVec::drain()`] for more details.

## Original

[`vec::Drain`](alloc::vec::Drain)

[`BitVec::drain()`]: crate::vec::BitVec::drain