// SPDX-License-Identifier: AGPL-3.0-or-later
//! Interfaces for interactions for hash-like structs.
usecrate::hash::Hash;/// Trait implemented on types which are derived from a hash.
pubtraitHashId{/// Return the hash this id is derived from.
fnas_hash(&self)->&Hash;/// Returns hash as bytes.
fnto_bytes(&self)->Vec<u8>{// Unwrap as we already validated the hash
hex::decode(self.as_hash().as_str()).unwrap()}}