[−][src]Struct zeros::Zeros
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
andHash
traits, so you can use it inHashSet
,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]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,