Struct bip_util::trans::TIDGenerator [] [src]

pub struct TIDGenerator<T> {
    // some fields omitted
}

Generates blocks of transaction ids where each block is shuffled before being used.

Works on all primitive numbers as well as non pot numbers. For numbers whose max value is smaller than the pre allocation length, it is possible for duplicates of those numbers to appear in the same block and, by extension, one after the other back to back.

Methods

impl<T> TIDGenerator<T> where T: Copy + Bounded + NumCast + One + Eq, Wrapping<T>: Add<Wrapping<T>, Output=Wrapping<T>>
[src]

fn new() -> TIDGenerator<T>

Create a new TIDGenerator.

fn generate(&mut self) -> T

Grab the next transaction id that was generated.