[][src]Struct base_pny::Coder

pub struct Coder<'a> { /* fields omitted */ }

Coder for a specific alphabet.

Methods

impl<'a> Coder<'a>
[src]

pub fn with_uniform_alphabet(
    alphabet: &'a [&str]
) -> Result<Self, CoderFactoryError>
[src]

Create a Coder with a uniform alphabet and no delimiter.

pub fn with_delimiter(
    alphabet: &'a [&str],
    delimiter: char
) -> Result<Self, CoderFactoryError>
[src]

Create a Coder with a delimiter.

pub fn encode(&self, value: u128) -> String
[src]

Encode data to the Coder's base.

pub fn decode(&self, value: &str) -> Result<u128, DecoderError>
[src]

Decode data from the Coder's base.

Trait Implementations

impl<'a> Debug for Coder<'a>
[src]

Auto Trait Implementations

impl<'a> Send for Coder<'a>

impl<'a> Sync for Coder<'a>

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]