Trait Base62

Source
pub trait Base62 {
    // Required method
    fn base62(&self) -> String;
}
Expand description

Encodes a u64 hash to base-62 string.

Required Methods§

Source

fn base62(&self) -> String

Encodes a u64 hash to base-62 string.

Implementations on Foreign Types§

Source§

impl Base62 for u32

Source§

fn base62(&self) -> String

Since 52*62^5 > 2^32, so 6 digit base62 string can represent u32 hash.

Source§

impl Base62 for u64

Source§

fn base62(&self) -> String

Since 52*62^10 > 2^64, so 11 digit base62 string can represent u64 hash.

Implementors§