pub struct TranscriptProofBuilder<'a> { /* private fields */ }
Expand description
Builder for TranscriptProof
.
Implementations§
source§impl<'a> TranscriptProofBuilder<'a>
impl<'a> TranscriptProofBuilder<'a>
sourcepub fn default_kind(&mut self, kind: TranscriptCommitmentKind) -> &mut Self
pub fn default_kind(&mut self, kind: TranscriptCommitmentKind) -> &mut Self
Sets the default kind of commitment to open when revealing ranges.
sourcepub fn reveal_with_kind(
&mut self,
ranges: &dyn ToRangeSet<usize>,
direction: Direction,
kind: TranscriptCommitmentKind,
) -> Result<&mut Self, TranscriptProofBuilderError>
pub fn reveal_with_kind( &mut self, ranges: &dyn ToRangeSet<usize>, direction: Direction, kind: TranscriptCommitmentKind, ) -> Result<&mut Self, TranscriptProofBuilderError>
Reveals the given ranges in the transcript using the provided kind of commitment.
§Arguments
ranges
- The ranges to reveal.direction
- The direction of the transcript.kind
- The kind of commitment to open.
sourcepub fn reveal(
&mut self,
ranges: &dyn ToRangeSet<usize>,
direction: Direction,
) -> Result<&mut Self, TranscriptProofBuilderError>
pub fn reveal( &mut self, ranges: &dyn ToRangeSet<usize>, direction: Direction, ) -> Result<&mut Self, TranscriptProofBuilderError>
Reveals the given ranges in the transcript using the default kind of commitment.
§Arguments
ranges
- The ranges to reveal.direction
- The direction of the transcript.
sourcepub fn reveal_sent(
&mut self,
ranges: &dyn ToRangeSet<usize>,
) -> Result<&mut Self, TranscriptProofBuilderError>
pub fn reveal_sent( &mut self, ranges: &dyn ToRangeSet<usize>, ) -> Result<&mut Self, TranscriptProofBuilderError>
Reveals the given ranges in the sent transcript using the default kind of commitment.
§Arguments
ranges
- The ranges to reveal.
sourcepub fn reveal_recv(
&mut self,
ranges: &dyn ToRangeSet<usize>,
) -> Result<&mut Self, TranscriptProofBuilderError>
pub fn reveal_recv( &mut self, ranges: &dyn ToRangeSet<usize>, ) -> Result<&mut Self, TranscriptProofBuilderError>
Reveals the given ranges in the received transcript using the default kind of commitment.
§Arguments
ranges
- The ranges to reveal.
sourcepub fn build(self) -> Result<TranscriptProof, TranscriptProofBuilderError>
pub fn build(self) -> Result<TranscriptProof, TranscriptProofBuilderError>
Builds the transcript proof.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TranscriptProofBuilder<'a>
impl<'a> RefUnwindSafe for TranscriptProofBuilder<'a>
impl<'a> Send for TranscriptProofBuilder<'a>
impl<'a> Sync for TranscriptProofBuilder<'a>
impl<'a> Unpin for TranscriptProofBuilder<'a>
impl<'a> UnwindSafe for TranscriptProofBuilder<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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