#[repr(transparent)]pub struct H160(pub H160Hash);Expand description
A SHA160 hash type.
Tuple Fields§
§0: H160HashImplementations§
Source§impl H160
impl H160
pub fn from_digest(digest: impl AsRef<[u8]>) -> Self
pub fn b3(data: impl AsRef<[u8]>) -> Self
pub fn random() -> Self
Sourcepub fn as_slice_mut(&mut self) -> &mut [u8] ⓘ
pub fn as_slice_mut(&mut self) -> &mut [u8] ⓘ
returns a mutable reference to the hash as a slice
Sourcepub fn copy_from_slice(&mut self, value: &[u8]) -> &mut Self
pub fn copy_from_slice(&mut self, value: &[u8]) -> &mut Self
copies the hash into the provided buffer
Sourcepub const fn get_mut(&mut self) -> &mut H160Hash
pub const fn get_mut(&mut self) -> &mut H160Hash
returns a mutable reference to the hash as a byte array
Trait Implementations§
Source§impl<'de> Deserialize<'de> for H160
impl<'de> Deserialize<'de> for H160
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for H160
impl From<GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for H160
Source§fn from(data: GenericHash) -> H160
fn from(data: GenericHash) -> H160
Converts to this type from the input type.
Source§impl FromIterator<u8> for H160
impl FromIterator<u8> for H160
Source§impl IntoIterator for H160
impl IntoIterator for H160
impl Copy for H160
impl Eq for H160
impl RawHash for H160
impl StructuralPartialEq for H160
Auto Trait Implementations§
impl Freeze for H160
impl RefUnwindSafe for H160
impl Send for H160
impl Sync for H160
impl Unpin for H160
impl UnwindSafe for H160
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