Enum libp2p::multiaddr::multihash::Code [−][src]
The code of Multihash.
Variants
Identity (Raw binary)
SHA-1 (20-byte hash size)
SHA-256 (32-byte hash size)
SHA-512 (64-byte hash size)
SHA3-224 (28-byte hash size)
SHA3-256 (32-byte hash size)
SHA3-384 (48-byte hash size)
SHA3-512 (64-byte hash size)
Keccak-224 (28-byte hash size)
Keccak-256 (32-byte hash size)
Keccak-384 (48-byte hash size)
Keccak-512 (64-byte hash size)
BLAKE2b-256 (32-byte hash size)
BLAKE2b-512 (64-byte hash size)
BLAKE2s-128 (16-byte hash size)
BLAKE2s-256 (32-byte hash size)
Implementations
impl Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
Hash some input and return the raw binary digest.
Trait Implementations
impl Clone for Code
[src]
impl Copy for Code
[src]
impl Debug for Code
[src]
impl Eq for Code
[src]
impl Hash for Code
[src]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl MultihashDigest<Code> for Identity
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Sha2_256
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Keccak224
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Blake2b512
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Sha3_256
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Keccak384
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Blake2s256
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Sha3_224
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Sha2_512
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Blake2b256
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Blake2s128
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Keccak256
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Sha3_384
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Sha3_512
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Keccak512
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl MultihashDigest<Code> for Sha1
[src]
pub fn code(&self) -> Code
[src]
pub fn digest(&self, data: &[u8]) -> MultihashGeneric<Code>
[src]
pub fn input(&mut self, data: &[u8])
[src]
pub fn result(self) -> MultihashGeneric<Code>
[src]
pub fn result_reset(&mut self) -> MultihashGeneric<Code>
[src]
pub fn reset(&mut self)
[src]
impl Multihasher<Code> for Blake2s128
[src]
impl Multihasher<Code> for Keccak512
[src]
impl Multihasher<Code> for Sha2_512
[src]
impl Multihasher<Code> for Keccak256
[src]
impl Multihasher<Code> for Sha1
[src]
impl Multihasher<Code> for Blake2s256
[src]
impl Multihasher<Code> for Keccak384
[src]
impl Multihasher<Code> for Blake2b256
[src]
impl Multihasher<Code> for Sha2_256
[src]
impl Multihasher<Code> for Sha3_256
[src]
impl Multihasher<Code> for Blake2b512
[src]
impl Multihasher<Code> for Sha3_512
[src]
impl Multihasher<Code> for Identity
[src]
impl Multihasher<Code> for Sha3_384
[src]
impl Multihasher<Code> for Sha3_224
[src]
impl Multihasher<Code> for Keccak224
[src]
impl Ord for Code
[src]
pub fn cmp(&self, other: &Code) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Code> for Code
[src]
pub fn eq(&self, other: &Code) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Code> for Code
[src]
pub fn partial_cmp(&self, other: &Code) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Code
[src]
impl StructuralPartialEq for Code
[src]
impl TryFrom<u64> for Code
[src]
Auto Trait Implementations
impl RefUnwindSafe for Code
impl Send for Code
impl Sync for Code
impl Unpin for Code
impl UnwindSafe for Code
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CallHasher for T where
T: Hash,
[src]
T: Hash,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,