pub struct Mona12Hash(pub u64, pub u8);Expand description
72-bit hash value that represents 2channel’s 12-character tripcode (12桁トリップ).
Tuple Fields§
§0: u64§1: u8Trait Implementations§
Source§impl AsciiTripcodeHash for Mona12Hash
impl AsciiTripcodeHash for Mona12Hash
Source§fn decode_from_ascii(tripcode: &[u8]) -> Option<Self>
fn decode_from_ascii(tripcode: &[u8]) -> Option<Self>
Decodes an ASCII-encoded tripcode into a hash value.
Source§fn append_ascii(self, dst: &mut Vec<u8>)
fn append_ascii(self, dst: &mut Vec<u8>)
Encodes
self into an ASCII-encoded tripcode and writes it on a String.Source§impl Clone for Mona12Hash
impl Clone for Mona12Hash
Source§fn clone(&self) -> Mona12Hash
fn clone(&self) -> Mona12Hash
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Mona12Hash
impl Debug for Mona12Hash
Source§impl Hash for Mona12Hash
impl Hash for Mona12Hash
Source§impl Ord for Mona12Hash
impl Ord for Mona12Hash
Source§fn cmp(&self, other: &Mona12Hash) -> Ordering
fn cmp(&self, other: &Mona12Hash) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Mona12Hash
impl PartialEq for Mona12Hash
Source§impl PartialOrd for Mona12Hash
impl PartialOrd for Mona12Hash
impl Copy for Mona12Hash
impl Eq for Mona12Hash
impl StructuralPartialEq for Mona12Hash
Auto Trait Implementations§
impl Freeze for Mona12Hash
impl RefUnwindSafe for Mona12Hash
impl Send for Mona12Hash
impl Sync for Mona12Hash
impl Unpin for Mona12Hash
impl UnwindSafe for Mona12Hash
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> TripcodeHash for Twhere
T: AsciiTripcodeHash,
impl<T> TripcodeHash for Twhere
T: AsciiTripcodeHash,
Source§fn max_len_sjis() -> usize
fn max_len_sjis() -> usize
Returns maximum length of resulting tripcode when encoded in Shift-JIS, in bytes.
Source§fn write<W>(self, dst: &mut W) -> Result<(), Error>where
W: Write,
fn write<W>(self, dst: &mut W) -> Result<(), Error>where
W: Write,
Encodes
self into a tripcode and writes it to a Write.Source§fn decode_from_sjis(tripcode: &[u8]) -> Option<T>
fn decode_from_sjis(tripcode: &[u8]) -> Option<T>
Decodes a Shift-JIS-encoded tripcode.
Source§fn append_sjis(self, dst: &mut Vec<u8>)
fn append_sjis(self, dst: &mut Vec<u8>)
Encodes
self into a Shift-JIS-encoded tripcode and appends it on a Vec<u8>.