Struct tlsn_core::commitment::TranscriptCommitmentBuilder
source · pub struct TranscriptCommitmentBuilder { /* private fields */ }
Expand description
A builder for TranscriptCommitments
.
Implementations§
source§impl TranscriptCommitmentBuilder
impl TranscriptCommitmentBuilder
sourcepub fn commit_sent(
&mut self,
ranges: &dyn ToRangeSet<usize>,
) -> Result<CommitmentId, TranscriptCommitmentBuilderError>
pub fn commit_sent( &mut self, ranges: &dyn ToRangeSet<usize>, ) -> Result<CommitmentId, TranscriptCommitmentBuilderError>
Commits to the provided ranges of the sent
transcript.
sourcepub fn commit_recv(
&mut self,
ranges: &dyn ToRangeSet<usize>,
) -> Result<CommitmentId, TranscriptCommitmentBuilderError>
pub fn commit_recv( &mut self, ranges: &dyn ToRangeSet<usize>, ) -> Result<CommitmentId, TranscriptCommitmentBuilderError>
Commits to the provided ranges of the received
transcript.
sourcepub fn commit(
&mut self,
ranges: &dyn ToRangeSet<usize>,
direction: Direction,
) -> Result<CommitmentId, TranscriptCommitmentBuilderError>
pub fn commit( &mut self, ranges: &dyn ToRangeSet<usize>, direction: Direction, ) -> Result<CommitmentId, TranscriptCommitmentBuilderError>
Commits to the provided ranges of the transcript.
sourcepub fn get_id(
&self,
kind: CommitmentKind,
ranges: impl Into<RangeSet<usize>>,
direction: Direction,
) -> Option<CommitmentId>
pub fn get_id( &self, kind: CommitmentKind, ranges: impl Into<RangeSet<usize>>, direction: Direction, ) -> Option<CommitmentId>
Gets the commitment id for the provided commitment info.
sourcepub fn build(
self,
) -> Result<TranscriptCommitments, TranscriptCommitmentBuilderError>
pub fn build( self, ) -> Result<TranscriptCommitments, TranscriptCommitmentBuilderError>
Builds the TranscriptCommitments
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TranscriptCommitmentBuilder
impl !RefUnwindSafe for TranscriptCommitmentBuilder
impl Send for TranscriptCommitmentBuilder
impl !Sync for TranscriptCommitmentBuilder
impl Unpin for TranscriptCommitmentBuilder
impl !UnwindSafe for TranscriptCommitmentBuilder
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