pub struct ContentAddress(/* private fields */);Expand description
The content address of a canonical byte encoding: a BLAKE3 digest (Aumasson, O’Connor, Neves & Wilcox-O’Hearn 2020).
The runtime never trusts a self-asserted address — it re-derives the address
from the bytes it is about to admit and compares (the fail-closed load gate);
a mismatch is rejected. Ord so addresses key the Merkle-DAG’s BTreeMaps
deterministically.
Implementations§
Source§impl ContentAddress
impl ContentAddress
Sourcepub fn of(canonical_bytes: &[u8]) -> Self
pub fn of(canonical_bytes: &[u8]) -> Self
Ground primitive: the content address of canonical_bytes. This is the
ONE computation the runtime grounds — .prx identity bottoms out here.
Trait Implementations§
Source§impl Clone for ContentAddress
impl Clone for ContentAddress
Source§fn clone(&self) -> ContentAddress
fn clone(&self) -> ContentAddress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ContentAddress
Source§impl Debug for ContentAddress
impl Debug for ContentAddress
impl Eq for ContentAddress
Source§impl Hash for ContentAddress
impl Hash for ContentAddress
Source§impl Ord for ContentAddress
impl Ord for ContentAddress
Source§fn cmp(&self, other: &ContentAddress) -> Ordering
fn cmp(&self, other: &ContentAddress) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ContentAddress
impl PartialEq for ContentAddress
Source§fn eq(&self, other: &ContentAddress) -> bool
fn eq(&self, other: &ContentAddress) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ContentAddress
impl PartialOrd for ContentAddress
impl StructuralPartialEq for ContentAddress
Auto Trait Implementations§
impl Freeze for ContentAddress
impl RefUnwindSafe for ContentAddress
impl Send for ContentAddress
impl Sync for ContentAddress
impl Unpin for ContentAddress
impl UnsafeUnpin for ContentAddress
impl UnwindSafe for ContentAddress
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