pub struct ProofSink { /* private fields */ }Expand description
Wrapper around an optional ProofEventSink.
When inner is None (the common, non-visualization path), all hot-path
calls go through a single branch and generate zero allocations.
Implementations§
Source§impl ProofSink
impl ProofSink
Sourcepub fn new(s: impl ProofEventSink) -> Self
pub fn new(s: impl ProofEventSink) -> Self
Create an active sink wrapping s.
Sourcepub fn emit(&self, event: ProofEvent)
pub fn emit(&self, event: ProofEvent)
Emit an event. No-op when inactive.
Sourcepub fn emit_if(&self, f: impl FnOnce() -> ProofEvent)
pub fn emit_if(&self, f: impl FnOnce() -> ProofEvent)
Emit the result of f() only when active.
The closure is never called when no sink is installed, so constructing an event in a hot loop (e.g. sumcheck rounds) costs nothing when disabled.
Auto Trait Implementations§
impl !RefUnwindSafe for ProofSink
impl !UnwindSafe for ProofSink
impl Freeze for ProofSink
impl Send for ProofSink
impl Sync for ProofSink
impl Unpin for ProofSink
impl UnsafeUnpin for ProofSink
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