[−][src]Type Definition cratetorrent::Bitfield
type Bitfield = BitVec<Msb0, u8>;
The bitfield represents the piece availability of a peer.
It is a compact bool vector of most significant bits to least significants
bits, that is, where the first highest bit represents the first piece, the
second highest element the second piece, and so on (e.g. 0b1100_0001
would
mean that we have pieces 0, 1, and 7). A truthy boolean value of a piece's
position in this vector means that the peer has the piece, while a falsy
value means it doesn't have the piece.