Struct envelope::BodyHash
zaun_community_protocol::envelope::BodyHash · Struct
pub struct BodyHash(…)SHA3-256 of a command’s body JSON text exactly as received: reformatting the
same JSON gives a different hash, which is why retries must resend byte-identical bodies.
Methods
Section titled “Methods”pub fn of(body: &RawValue) -> SelfHashes a received body.
of_text
Section titled “of_text”pub fn of_text(text: &str) -> SelfHashes body JSON text.
from_bytes
Section titled “from_bytes”pub const fn from_bytes(bytes: [u8; 32]) -> SelfWraps a stored hash.
as_bytes
Section titled “as_bytes”pub const fn as_bytes(&self) -> &[u8; 32]The digest bytes, for storage.
Trait implementations
Section titled “Trait implementations”Clone, Copy, Debug, Eq, Hash, PartialEq, StructuralPartialEq