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
fn to_quint(&self) -> String
Converts this type into a proquint String
Example
use proquint::Quintable; let foo: u32 = 12; assert_eq!(foo.to_quint(), "babab-babas");
fn from_quint(_: &str) -> Result<Self, QuintError>
Converts a proquint string to this type
Example
use proquint::Quintable; assert_eq!(u32::from_quint("rotab-vinat").unwrap(), 3141592653u32);