Struct stacks_common::types::chainstate::TrieHash
source · pub struct TrieHash(pub [u8; 32]);
Expand description
Hash of a Trie node. This is a SHA2-512/256.
Tuple Fields§
§0: [u8; 32]
Implementations§
source§impl TrieHash
impl TrieHash
source§impl TrieHash
impl TrieHash
sourcepub fn from_bytes(inp: &[u8]) -> Option<TrieHash>
pub fn from_bytes(inp: &[u8]) -> Option<TrieHash>
Instantiates from a slice of bytes
sourcepub fn from_bytes_be(inp: &[u8]) -> Option<TrieHash>
pub fn from_bytes_be(inp: &[u8]) -> Option<TrieHash>
Instantiates from a slice of bytes, converting to host byte order
Trait Implementations§
source§impl<'de> Deserialize<'de> for TrieHash
impl<'de> Deserialize<'de> for TrieHash
source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<TrieHash, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<TrieHash, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl FromSql for TrieHash
impl FromSql for TrieHash
source§fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
Converts SQLite value into Rust value.
source§impl Ord for TrieHash
impl Ord for TrieHash
source§impl PartialEq<TrieHash> for TrieHash
impl PartialEq<TrieHash> for TrieHash
source§impl PartialOrd<TrieHash> for TrieHash
impl PartialOrd<TrieHash> for TrieHash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl StacksMessageCodec for TrieHash
impl StacksMessageCodec for TrieHash
source§impl ToSql for TrieHash
impl ToSql for TrieHash
source§fn to_sql(&self) -> Result<ToSqlOutput<'_>>
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Converts Rust value to SQLite value
impl Copy for TrieHash
impl Eq for TrieHash
Auto Trait Implementations§
impl RefUnwindSafe for TrieHash
impl Send for TrieHash
impl Sync for TrieHash
impl Unpin for TrieHash
impl UnwindSafe for TrieHash
Blanket Implementations§
source§impl<T> Base32Len for Twhere
T: AsRef<[u8]>,
impl<T> Base32Len for Twhere T: AsRef<[u8]>,
source§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
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
§impl<T> InitializableFromZeroed for Twhere
T: Default,
impl<T> InitializableFromZeroed for Twhere T: Default,
§unsafe fn initialize(place: *mut T)
unsafe fn initialize(place: *mut T)
Called to initialize a place to a valid value, after it is set
to all-bits-zero. Read more
source§impl<T> ToBase32 for Twhere
T: AsRef<[u8]>,
impl<T> ToBase32 for Twhere T: AsRef<[u8]>,
source§fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where W: WriteBase32,
Encode as base32 and write it to the supplied writer
Implementations shouldn’t allocate.