[][src]Struct zeros::Zeros

pub struct Zeros { /* fields omitted */ }

Zeros

Features

  • Can be converted from some common hash slices such as [u8; 16], [u8; 64]...
  • Implemented Debug via #[derive(Debug)], so internal field(s) are printed similarly to usual way you work with Rust.
  • Implemented Display, which prints hex string of the hash, in lower-case.
  • Implemented Eq and Hash traits, so you can use it in HashSet, HashMap...

Methods

impl Zeros[src]

pub fn hex(&self) -> String[src]

Prints self as a hex string, in lower-case

Examples

use zeros::Zeros;

assert_eq!(
    Zeros::from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]).hex(),
    "000102030405060708090a0b0c0d0e0f",
);

pub fn into_hex(self) -> String[src]

Trait Implementations

impl From<[u8; 16]> for Zeros[src]

impl From<[u8; 28]> for Zeros[src]

impl From<[u8; 32]> for Zeros[src]

impl From<[u8; 48]> for Zeros[src]

impl From<[u8; 64]> for Zeros[src]

impl From<Zeros> for Vec<u8>[src]

impl Eq for Zeros[src]

impl AsRef<[u8]> for Zeros[src]

impl PartialEq<Zeros> for Zeros[src]

impl Display for Zeros[src]

impl Debug for Zeros[src]

impl Hash for Zeros[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Zeros

impl Sync for Zeros

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]