Trait proquint::Quintable [] [src]

pub trait Quintable where
    Self: Sized
{ fn to_quint(&self) -> String;
fn from_quint(_: &str) -> Result<Self, QuintError>; }

Trait for values that can be converted to proquints

More about proquints here at the original proposal: https://arxiv.org/html/0901.4016

Required Methods

Converts this type into a proquint String

Example

use proquint::Quintable;

let foo: u32 = 12;
assert_eq!(foo.to_quint(), "babab-babas");

Converts a proquint string to this type

Example

use proquint::Quintable;

assert_eq!(u32::from_quint("rotab-vinat").unwrap(), 3141592653u32);

Implementations on Foreign Types

impl Quintable for u16
[src]

[src]

[src]

impl Quintable for u32
[src]

[src]

[src]

impl Quintable for u64
[src]

[src]

[src]

impl Quintable for Ipv4Addr
[src]

Implementors