Struct flaker::Flaker
[−]
[src]
pub struct Flaker { /* fields omitted */ }
Methods
impl Flaker
[src]
fn new_from_identifier(identifier: Vec<u8>) -> Flaker
Returns a new Flaker based on the specified identifier
Arguments
identifier
- A 6 byte vec that provides some arbitrary identification.
Remarks
This is a convenience function that converts the identifier
vec
into
a 6 byte array. Where possible, prefer the array and use new
.
Note: This also assumes the flaker
is being created on a little endian
CPU.
fn new(identifier: [u8; 6], endian: Endianness) -> Flaker
Returns a new Flaker based on the specified identifier
Arguments
identifier
- A 6 byte vec that provides some arbitrary identification.little_endian
- For specifying endianness. This is important for byte order when constructing the flake.
fn get_id(&mut self) -> Result<BigUint, FlakeError>
Generate a new ID