Trait Trinary

Source
pub trait Trinary {
    // Required methods
    fn trits(&self) -> Vec<Trit> ;
    fn trits_with_length(&self, length: usize) -> Vec<Trit> ;
    fn trytes(&self) -> Result<Trytes, Error>;
}
Expand description

Trait used to enable conversion to trinary types

Required Methods§

Source

fn trits(&self) -> Vec<Trit>

Provides the trit vector representation of the value

Source

fn trits_with_length(&self, length: usize) -> Vec<Trit>

Provides the trit vector representation of the value with given length, padding with 0 if required

Source

fn trytes(&self) -> Result<Trytes, Error>

Provides the tryte string representation of the value

Implementations on Foreign Types§

Source§

impl Trinary for &str

Source§

impl Trinary for &[Trit]

Source§

impl Trinary for i64

Source§

impl Trinary for Vec<Trit>

Source§

impl Trinary for [Trit; 243]

Implementors§