pub struct MerkleProofShape<const MAX_DEPTH: usize, const LEAF_BYTES: usize = SHA256_BYTES>;Expand description
Parametric ConstrainedTypeShape for a Merkle-inclusion proof.
Carries MAX_DEPTH sibling-digests of LEAF_BYTES each plus a
leaf-index — (MAX_DEPTH * LEAF_BYTES + 8) bytes total (the +8
for a u64 leaf-index). Per ADR-031’s MerkleProof<MaxDepth> shape
commitment.
Trait Implementations§
Source§impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Clone for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Clone for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
Source§fn clone(&self) -> MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
fn clone(&self) -> MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
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 moreSource§impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> ConstrainedTypeShape for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> ConstrainedTypeShape for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
Source§const IRI: &'static str = "https://uor.foundation/type/ConstrainedType"
const IRI: &'static str = "https://uor.foundation/type/ConstrainedType"
IRI of the ontology
type:ConstrainedType instance this shape represents.Source§const SITE_COUNT: usize
const SITE_COUNT: usize
Number of sites (fields) this constrained type carries.
Source§const CONSTRAINTS: &'static [ConstraintRef]
const CONSTRAINTS: &'static [ConstraintRef]
Per-site constraint list. Empty means unconstrained.
Source§const CYCLE_SIZE: u64
const CYCLE_SIZE: u64
ADR-032: cardinality of the shape’s value-set (the cycle
structure of the shape under the substrate’s discrete-clock
model). Used by the
prism_model! macro to lower first_admit
(closure-body grammar G16) to the correct descent measure.
Conventions: Read moreSource§const SITE_BUDGET: usize = Self::SITE_COUNT
const SITE_BUDGET: usize = Self::SITE_COUNT
Ontology-level
siteBudget: count of data sites only,
excluding bookkeeping introduced by composition (coproduct tag
sites, etc.). Equals SITE_COUNT for leaf shapes and for
shapes whose composition introduces no bookkeeping (products,
cartesian products). Strictly less than SITE_COUNT for coproduct
shapes and any shape whose SITE_COUNT includes inherited
bookkeeping. Introduced by the Product/Coproduct Completion
Amendment §4a; defaults to SITE_COUNT so pre-amendment
shape impls remain valid without edits.Source§impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Debug for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Debug for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
Source§impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Default for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Default for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
Source§impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> IntoBindingValue for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> IntoBindingValue for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
Source§const MAX_BYTES: usize
const MAX_BYTES: usize
Maximum byte length any value of this shape can produce when
serialized via [
into_binding_bytes]. Used by run_route to
size the on-stack buffer and reject inputs that would overflow.Source§fn into_binding_bytes(&self, _out: &mut [u8]) -> Result<usize, ShapeViolation>
fn into_binding_bytes(&self, _out: &mut [u8]) -> Result<usize, ShapeViolation>
Serialize this input value into the binding-table form.
out is a
fixed-capacity buffer the call-site provides; the implementation
writes the canonical content-addressable byte sequence and returns
the written length. Read moreimpl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Copy for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> GroundedShape for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Sealed for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
Auto Trait Implementations§
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Freeze for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> RefUnwindSafe for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Send for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Sync for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> Unpin for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> UnsafeUnpin for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
impl<const MAX_DEPTH: usize, const LEAF_BYTES: usize> UnwindSafe for MerkleProofShape<MAX_DEPTH, LEAF_BYTES>
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