Module steamidfx::bit_iterator[][src]

An iterator over bits. Provides a simple implementation of an iterator over bits of an integer. Used to navigate through the bits in the steam id.

Example:

let num = 76561197983318796;
let mut iter = steamidfx::bit_iterator::BitIterator::new(num, 8);
assert_eq!(iter.next(), Some(1));
assert_eq!(iter.next(), Some(16));
assert_eq!(iter.next(), Some(0));
assert_eq!(iter.next(), Some(1));
assert_eq!(iter.next(), Some(1));
assert_eq!(iter.next(), Some(95));
assert_eq!(iter.next(), Some(195));
assert_eq!(iter.next(), Some(12));
assert_eq!(iter.next(), None);

In case you need to work with steam id yourself, this struct may be helpful.

Structs

BitIterator

An iterator over the bits of a u64 number. The bit reading (the iteration) starts always from the left to the right. That means, the first processed bits are going to be 64, 63, 62 … until the last, 0th bit.