pub enum Size {
    Medium,
    Long,
    VeryLong,
}
Expand description

Size which can be cast into usize to use as the size of the output byte array e.g.

Example

use cool_id_generator::Size;

const size: usize = Size::Medium as usize;
let byte_array: [u8; size] = [0u8; size];

Variants

Medium

The largest size (in bytes) of a Medium ID; 1 billion combinations

Long

The largest size (in bytes) of a Long ID; 115 billion combinations

VeryLong

The largest size (in bytes) of a VeryLong ID; 10^15 combinations (or 2,088,136,477,473,228)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.