pub struct AggregateProof {
pub proofs: Vec<PermissionProof>,
pub aggregate: Vec<u8>,
}Expand description
Aggregate multiple permission proofs into a single proof
Useful for “user has access to ANY of [doc1, doc2, doc3]” without revealing which one
Fields§
§proofs: Vec<PermissionProof>Individual proofs being aggregated
aggregate: Vec<u8>Aggregated proof (smaller than sum of individual proofs)
Implementations§
Source§impl AggregateProof
impl AggregateProof
Sourcepub fn aggregate(proofs: Vec<PermissionProof>) -> Result<Self>
pub fn aggregate(proofs: Vec<PermissionProof>) -> Result<Self>
Create an aggregate proof from multiple permission proofs
Sourcepub fn verify(&self, verifier: &mut ZkVerifier) -> Result<bool>
pub fn verify(&self, verifier: &mut ZkVerifier) -> Result<bool>
Verify the aggregate proof
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AggregateProof
impl RefUnwindSafe for AggregateProof
impl Send for AggregateProof
impl Sync for AggregateProof
impl Unpin for AggregateProof
impl UnwindSafe for AggregateProof
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more