pub struct SingletonCommitment<P>where
P: ObservablePredicate,{
pub predicate: P,
}Expand description
Wiki ADR-048: a single typed predicate over a UOR observable per
ADR-049. bandwidth_bits = -log2(P::accept_prob()),
accept_prob = P::accept_prob(), evaluate = P::evaluate(kappa_label),
predicate_count = 1.
Fields§
§predicate: PThe wrapped typed-observable predicate.
Trait Implementations§
Source§impl<P> Clone for SingletonCommitment<P>where
P: Clone + ObservablePredicate,
impl<P> Clone for SingletonCommitment<P>where
P: Clone + ObservablePredicate,
Source§fn clone(&self) -> SingletonCommitment<P>
fn clone(&self) -> SingletonCommitment<P>
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<P> Debug for SingletonCommitment<P>where
P: Debug + ObservablePredicate,
impl<P> Debug for SingletonCommitment<P>where
P: Debug + ObservablePredicate,
Source§impl<P> TypedCommitment for SingletonCommitment<P>where
P: ObservablePredicate,
impl<P> TypedCommitment for SingletonCommitment<P>where
P: ObservablePredicate,
Source§fn bandwidth_bits(&self) -> f64
fn bandwidth_bits(&self) -> f64
Bandwidth in bits the commitment encodes per κ-label.
Equal to
-log2(accept_prob()) by U6 per ADR-047. The architectural
interpretation: each declared predicate is one bit of structural
commitment in the κ-label at proportional PRF cost.Source§fn accept_prob(&self) -> f64
fn accept_prob(&self) -> f64
PRF acceptance probability under the random-oracle baseline.
Equal to the product of per-predicate acceptances; tight per the
Hardening Principle’s U1 + U2 axioms (ADR-047).
Source§fn evaluate(&self, kappa_label: &[u8]) -> bool
fn evaluate(&self, kappa_label: &[u8]) -> bool
Evaluate the commitment on the κ-label byte sequence.
Returns true iff every underlying predicate accepts.
Monomorphized per concrete
C: TypedCommitment at compile time.Source§fn predicate_count(&self) -> usize
fn predicate_count(&self) -> usize
Number of typed predicates conjuncted in this commitment.
Source§fn predicate_iris(&self) -> &'static [&'static str]
fn predicate_iris(&self) -> &'static [&'static str]
Names the
observable:Observable IRIs this commitment evaluates,
in AndCommitment-derived left-associative order. Used by the
CommitmentEvaluated trace event per ADR-008 + ADR-048.impl<P> Copy for SingletonCommitment<P>where
P: Copy + ObservablePredicate,
Auto Trait Implementations§
impl<P> Freeze for SingletonCommitment<P>where
P: Freeze,
impl<P> RefUnwindSafe for SingletonCommitment<P>where
P: RefUnwindSafe,
impl<P> Send for SingletonCommitment<P>where
P: Send,
impl<P> Sync for SingletonCommitment<P>where
P: Sync,
impl<P> Unpin for SingletonCommitment<P>where
P: Unpin,
impl<P> UnsafeUnpin for SingletonCommitment<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for SingletonCommitment<P>where
P: UnwindSafe,
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