pub struct ProofCompressor { /* private fields */ }Expand description
Proof compression utilities
Implementations§
Source§impl ProofCompressor
impl ProofCompressor
Sourcepub fn compress(&mut self, store: &mut ProofFragmentStore) -> CompressionStats
pub fn compress(&mut self, store: &mut ProofFragmentStore) -> CompressionStats
Compress a proof by removing redundant steps
This performs:
- Common subproof elimination (CSE)
- Redundant step removal
- Delta encoding for similar proofs
Sourcepub fn compute_delta(
&self,
base_proof: &ProofFragment,
new_proof: &ProofFragment,
) -> Vec<ProofFragment>
pub fn compute_delta( &self, base_proof: &ProofFragment, new_proof: &ProofFragment, ) -> Vec<ProofFragment>
Compute the delta between two proofs
Returns only the fragments that differ between two proofs
Sourcepub fn stats(&self) -> &CompressionStats
pub fn stats(&self) -> &CompressionStats
Get compression statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProofCompressor
impl RefUnwindSafe for ProofCompressor
impl Send for ProofCompressor
impl Sync for ProofCompressor
impl Unpin for ProofCompressor
impl UnwindSafe for ProofCompressor
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