Struct steamidfx::bit_iterator::BitIterator[][src]

pub struct BitIterator { /* fields omitted */ }

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.

Implementations

impl BitIterator[src]

#[must_use]
pub fn new(object: u64, iter_length: u8) -> BitIterator

Notable traits for BitIterator

impl Iterator for BitIterator type Item = u64;
[src]

Instantiates a new bit iterator. Requires an object to iterate over and a length of a single iteration.

Panics

Panics if the iter_length is greater than self.current_pos, which is the current bit positions of the iterator within the object.

pub fn change_iter_length(&mut self, iter_length: u8) -> &mut BitIterator

Notable traits for BitIterator

impl Iterator for BitIterator type Item = u64;
[src]

Changes the length of a single iteration.

Panics

Panics if the iter_length is greater than the self.current_pos, which is the current bit positions of the iterator within the object.

pub fn next_bits<T: TryFrom<u64>>(&mut self, amount: u8) -> Option<T>[src]

Changes the iteration length to amount and tries to fetch the amount of bits from the object.

Trait Implementations

impl Iterator for BitIterator[src]

type Item = u64

The type of the elements being iterated over.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.