Trait tripcode::hash::AsciiTripcodeHash
[−]
[src]
pub trait AsciiTripcodeHash: Sized { fn decode_from_ascii(_: &[u8]) -> Option<Self>; fn max_len() -> usize; fn append_ascii(self, _: &mut Vec<u8>); fn write_ascii<W: Write>(self, _: &mut W) -> Result<()>; fn encode_to_ascii(self) -> Vec<u8> { ... } }
Trait for hash values that represent ASCII-encoded tripcodes.
Users should not use the methods of this trait directly. Instead, use the methods of the trait
TripcodeHash
, which is automatically implemented for types of this trait.
Required Methods
fn decode_from_ascii(_: &[u8]) -> Option<Self>
Decodes an ASCII-encoded tripcode into a hash value.
fn max_len() -> usize
Returns maximum length of resulting tripcode.
fn append_ascii(self, _: &mut Vec<u8>)
Encodes self
into an ASCII-encoded tripcode and writes it on a String
.
fn write_ascii<W: Write>(self, _: &mut W) -> Result<()>
Encodes self
into an ASCII-encoded tripcode and writes it to a Write
.
Provided Methods
fn encode_to_ascii(self) -> Vec<u8>
Encodes self
into an ASCII-encoded tripcode.
Implementors
impl AsciiTripcodeHash for MonaHash
impl AsciiTripcodeHash for FourchanHash
impl AsciiTripcodeHash for Mona12Hash
impl AsciiTripcodeHash for Sc15Hash