Struct harsh::Harsh
[−]
[src]
pub struct Harsh { // some fields omitted }
A rustic implementation of Hashids.
This should be created by use of the HarshFactory
struct, which
will be consumed upon initialization. Harsh
is Send + Sync
,
meaning just one can be used pretty much through your system.
Methods
impl Harsh
[src]
fn encode(&self, values: &[u64]) -> Option<String>
Encodes a slice of u64
values into a single hashid.
fn decode<T: AsRef<str>>(&self, value: T) -> Option<Vec<u64>>
Decodes a single hashid into a slice of u64
values.
fn encode_hex(&self, hex: &str) -> Option<String>
Encodes a hex string into a hashid.
fn decode_hex(&self, value: &str) -> Option<String>
Decodes a hashid into a hex string.
Trait Implementations
impl Debug for Harsh
[src]
impl Clone for Harsh
[src]
fn clone(&self) -> Harsh
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more