pub struct Commitment(/* private fields */);
Expand description
Commitment to polynomial
Implementations§
source§impl Commitment
impl Commitment
sourcepub fn try_from_bytes(bytes: &[u8; 48]) -> Result<Self, String>
pub fn try_from_bytes(bytes: &[u8; 48]) -> Result<Self, String>
Try to deserialize commitment from raw bytes
sourcepub fn slice_to_repr(value: &[Self]) -> &[FsG1]
pub fn slice_to_repr(value: &[Self]) -> &[FsG1]
Convenient conversion from slice of commitment to underlying representation for efficiency purposes.
sourcepub fn slice_from_repr(value: &[FsG1]) -> &[Self]
pub fn slice_from_repr(value: &[FsG1]) -> &[Self]
Convenient conversion from slice of underlying representation to commitment for efficiency purposes.
sourcepub fn slice_option_to_repr(value: &[Option<Self>]) -> &[Option<FsG1>]
pub fn slice_option_to_repr(value: &[Option<Self>]) -> &[Option<FsG1>]
Convenient conversion from slice of optional commitment to underlying representation for efficiency purposes.
sourcepub fn slice_option_from_repr(value: &[Option<FsG1>]) -> &[Option<Self>]
pub fn slice_option_from_repr(value: &[Option<FsG1>]) -> &[Option<Self>]
Convenient conversion from slice of optional underlying representation to commitment for efficiency purposes.
sourcepub fn slice_mut_to_repr(value: &mut [Self]) -> &mut [FsG1]
pub fn slice_mut_to_repr(value: &mut [Self]) -> &mut [FsG1]
Convenient conversion from mutable slice of commitment to underlying representation for efficiency purposes.
sourcepub fn slice_mut_from_repr(value: &mut [FsG1]) -> &mut [Self]
pub fn slice_mut_from_repr(value: &mut [FsG1]) -> &mut [Self]
Convenient conversion from mutable slice of underlying representation to commitment for efficiency purposes.
sourcepub fn slice_option_mut_to_repr(
value: &mut [Option<Self>],
) -> &mut [Option<FsG1>]
pub fn slice_option_mut_to_repr( value: &mut [Option<Self>], ) -> &mut [Option<FsG1>]
Convenient conversion from optional mutable slice of commitment to underlying representation for efficiency purposes.
sourcepub fn slice_option_mut_from_repr(
value: &mut [Option<FsG1>],
) -> &mut [Option<Self>]
pub fn slice_option_mut_from_repr( value: &mut [Option<FsG1>], ) -> &mut [Option<Self>]
Convenient conversion from optional mutable slice of underlying representation to commitment for efficiency purposes.
sourcepub fn vec_to_repr(value: Vec<Self>) -> Vec<FsG1>
pub fn vec_to_repr(value: Vec<Self>) -> Vec<FsG1>
Convenient conversion from vector of commitment to underlying representation for efficiency purposes.
sourcepub fn vec_from_repr(value: Vec<FsG1>) -> Vec<Self>
pub fn vec_from_repr(value: Vec<FsG1>) -> Vec<Self>
Convenient conversion from vector of underlying representation to commitment for efficiency purposes.
Trait Implementations§
source§impl AsMut<FsG1> for Commitment
impl AsMut<FsG1> for Commitment
source§impl AsRef<FsG1> for Commitment
impl AsRef<FsG1> for Commitment
source§impl Clone for Commitment
impl Clone for Commitment
source§fn clone(&self) -> Commitment
fn clone(&self) -> Commitment
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Commitment
impl Debug for Commitment
source§impl Default for Commitment
impl Default for Commitment
source§fn default() -> Commitment
fn default() -> Commitment
source§impl Deref for Commitment
impl Deref for Commitment
source§impl DerefMut for Commitment
impl DerefMut for Commitment
source§impl From<&Commitment> for [u8; 48]
impl From<&Commitment> for [u8; 48]
source§fn from(commitment: &Commitment) -> Self
fn from(commitment: &Commitment) -> Self
source§impl From<Commitment> for [u8; 48]
impl From<Commitment> for [u8; 48]
source§fn from(commitment: Commitment) -> Self
fn from(commitment: Commitment) -> Self
source§impl From<Commitment> for FsG1
impl From<Commitment> for FsG1
source§fn from(value: Commitment) -> Self
fn from(value: Commitment) -> Self
source§impl From<Commitment> for RecordCommitment
impl From<Commitment> for RecordCommitment
source§fn from(commitment: Commitment) -> Self
fn from(commitment: Commitment) -> Self
source§impl From<Commitment> for SegmentCommitment
impl From<Commitment> for SegmentCommitment
source§fn from(commitment: Commitment) -> Self
fn from(commitment: Commitment) -> Self
source§impl From<FsG1> for Commitment
impl From<FsG1> for Commitment
source§impl PartialEq for Commitment
impl PartialEq for Commitment
source§impl TryFrom<&RecordCommitment> for Commitment
impl TryFrom<&RecordCommitment> for Commitment
source§impl TryFrom<&SegmentCommitment> for Commitment
impl TryFrom<&SegmentCommitment> for Commitment
source§impl TryFrom<RecordCommitment> for Commitment
impl TryFrom<RecordCommitment> for Commitment
source§impl TryFrom<SegmentCommitment> for Commitment
impl TryFrom<SegmentCommitment> for Commitment
impl Copy for Commitment
impl Eq for Commitment
impl StructuralPartialEq for Commitment
Auto Trait Implementations§
impl Freeze for Commitment
impl RefUnwindSafe for Commitment
impl Send for Commitment
impl Sync for Commitment
impl Unpin for Commitment
impl UnwindSafe for Commitment
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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>
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>
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