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

Decodes an ASCII-encoded tripcode into a hash value.

Returns maximum length of resulting tripcode.

Encodes self into an ASCII-encoded tripcode and writes it on a String.

Encodes self into an ASCII-encoded tripcode and writes it to a Write.

Provided Methods

Encodes self into an ASCII-encoded tripcode.

Implementors