Struct tlsn_core::proof::SubstringsProofBuilder
source · pub struct SubstringsProofBuilder<'a> { /* private fields */ }
Expand description
A builder for SubstringsProof
Implementations§
source§impl<'a> SubstringsProofBuilder<'a>
impl<'a> SubstringsProofBuilder<'a>
sourcepub fn new(
commitments: &'a TranscriptCommitments,
transcript_tx: &'a Transcript,
transcript_rx: &'a Transcript,
) -> Self
pub fn new( commitments: &'a TranscriptCommitments, transcript_tx: &'a Transcript, transcript_rx: &'a Transcript, ) -> Self
Creates a new builder.
sourcepub fn commitments(&self) -> &TranscriptCommitments
pub fn commitments(&self) -> &TranscriptCommitments
Returns a reference to the commitments.
sourcepub fn reveal_sent(
&mut self,
ranges: &dyn ToRangeSet<usize>,
commitment_kind: CommitmentKind,
) -> Result<&mut Self, SubstringsProofBuilderError>
pub fn reveal_sent( &mut self, ranges: &dyn ToRangeSet<usize>, commitment_kind: CommitmentKind, ) -> Result<&mut Self, SubstringsProofBuilderError>
Reveals data corresponding to the provided ranges in the sent direction.
sourcepub fn reveal_recv(
&mut self,
ranges: &dyn ToRangeSet<usize>,
commitment_kind: CommitmentKind,
) -> Result<&mut Self, SubstringsProofBuilderError>
pub fn reveal_recv( &mut self, ranges: &dyn ToRangeSet<usize>, commitment_kind: CommitmentKind, ) -> Result<&mut Self, SubstringsProofBuilderError>
Reveals data corresponding to the provided transcript subsequence in the received direction.
sourcepub fn reveal(
&mut self,
ranges: &dyn ToRangeSet<usize>,
direction: Direction,
commitment_kind: CommitmentKind,
) -> Result<&mut Self, SubstringsProofBuilderError>
pub fn reveal( &mut self, ranges: &dyn ToRangeSet<usize>, direction: Direction, commitment_kind: CommitmentKind, ) -> Result<&mut Self, SubstringsProofBuilderError>
Reveals data corresponding to the provided ranges and direction.
sourcepub fn reveal_by_id(
&mut self,
id: CommitmentId,
) -> Result<&mut Self, SubstringsProofBuilderError>
pub fn reveal_by_id( &mut self, id: CommitmentId, ) -> Result<&mut Self, SubstringsProofBuilderError>
Reveals data corresponding to the provided commitment id
sourcepub fn build(self) -> Result<SubstringsProof, SubstringsProofBuilderError>
pub fn build(self) -> Result<SubstringsProof, SubstringsProofBuilderError>
Builds the SubstringsProof
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SubstringsProofBuilder<'a>
impl<'a> RefUnwindSafe for SubstringsProofBuilder<'a>
impl<'a> Send for SubstringsProofBuilder<'a>
impl<'a> Sync for SubstringsProofBuilder<'a>
impl<'a> Unpin for SubstringsProofBuilder<'a>
impl<'a> UnwindSafe for SubstringsProofBuilder<'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