pub struct Claim<F, G> {
pub commitment: G,
pub product: F,
pub y: F,
pub log_len: u8,
}Expand description
The public claim we’re making about the inner product.
We claim that our commitment P is equal to <a_i, G_i> + <b_i, y^i H_i>,
and that our product c is equal to <a_i, b_i>.
Fields§
§commitment: G§product: F§y: F§log_len: u8The claimed vector length, stored as log2(len).
Inner product arguments require power-of-two vector lengths, so storing the logarithm is enough to recover the full claimed length.
Trait Implementations§
Source§impl<F: EncodeSize, G: EncodeSize> EncodeSize for Claim<F, G>
impl<F: EncodeSize, G: EncodeSize> EncodeSize for Claim<F, G>
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§fn encode_inline_size(&self) -> usize
fn encode_inline_size(&self) -> usize
Returns the encoded size excluding bytes passed to
BufsMut::push
during Write::write_bufs. Used to size the working buffer for inline
writes. Override alongside Write::write_bufs for types where large
Bytes fields go via push; failing to do so will over-allocate.Source§impl<F: Read, G: Read> Read for Claim<F, G>
impl<F: Read, G: Read> Read for Claim<F, G>
impl<F: PartialEq, G: PartialEq> StructuralPartialEq for Claim<F, G>
Source§impl<F: Write, G: Write> Write for Claim<F, G>
impl<F: Write, G: Write> Write for Claim<F, G>
Source§fn write_bufs(&self, buf: &mut impl BufsMut)
fn write_bufs(&self, buf: &mut impl BufsMut)
Writes to a
BufsMut, allowing existing Bytes chunks to be
appended via BufsMut::push instead of written inline. Must encode
to the same format as Write::write. Defaults to Write::write.Auto Trait Implementations§
impl<F, G> Freeze for Claim<F, G>
impl<F, G> RefUnwindSafe for Claim<F, G>where
G: RefUnwindSafe,
F: RefUnwindSafe,
impl<F, G> Send for Claim<F, G>
impl<F, G> Sync for Claim<F, G>
impl<F, G> Unpin for Claim<F, G>
impl<F, G> UnsafeUnpin for Claim<F, G>where
G: UnsafeUnpin,
F: UnsafeUnpin,
impl<F, G> UnwindSafe for Claim<F, G>where
G: UnwindSafe,
F: UnwindSafe,
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> Codec for T
Source§impl<X, U> DecodeRangeExt<X> for U
impl<X, U> DecodeRangeExt<X> for U
Source§fn decode_range(
buf: impl Buf,
range: impl RangeBounds<usize>,
) -> Result<Self, Error>
fn decode_range( buf: impl Buf, range: impl RangeBounds<usize>, ) -> Result<Self, Error>
Decodes a value using only a range configuration. Read more
Source§impl<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<X, U> ReadRangeExt<X> for U
impl<X, U> ReadRangeExt<X> for U
Source§fn read_range(
buf: &mut impl Buf,
range: impl RangeBounds<usize>,
) -> Result<Self, Error>
fn read_range( buf: &mut impl Buf, range: impl RangeBounds<usize>, ) -> Result<Self, Error>
Reads a value using only a range configuration. Read more