Struct commit_verify::mpc::MerkleProof
source · pub struct MerkleProof { /* private fields */ }
Expand description
A proof of the merkle commitment.
Implementations§
source§impl MerkleProof
impl MerkleProof
sourcepub fn pos(&self) -> u32
pub fn pos(&self) -> u32
Method returning copy of MerkleProof::pos
field.
Position of the leaf in the tree.
sourcepub fn cofactor(&self) -> u16
pub fn cofactor(&self) -> u16
Method returning copy of MerkleProof::cofactor
field.
Cofactor used by the Merkle tree.
source§impl MerkleProof
impl MerkleProof
sourcepub fn into_path(self) -> Confined<Vec<MerkleNode>, 0, 32>
pub fn into_path(self) -> Confined<Vec<MerkleNode>, 0, 32>
Converts the proof into inner merkle path representation
sourcepub fn to_path(&self) -> Confined<Vec<MerkleNode>, 0, 32>
pub fn to_path(&self) -> Confined<Vec<MerkleNode>, 0, 32>
Constructs the proof into inner merkle path representation
sourcepub fn as_path(&self) -> &[MerkleNode]
pub fn as_path(&self) -> &[MerkleNode]
Returns inner merkle path representation
sourcepub fn convolve(
&self,
protocol_id: ProtocolId,
message: Message
) -> Result<Commitment, InvalidProof>
pub fn convolve( &self, protocol_id: ProtocolId, message: Message ) -> Result<Commitment, InvalidProof>
Convolves the proof with the message
under the given protocol_id
,
producing Commitment
.
Trait Implementations§
source§impl Clone for MerkleProof
impl Clone for MerkleProof
source§fn clone(&self) -> MerkleProof
fn clone(&self) -> MerkleProof
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CommitStrategy for MerkleProof
impl CommitStrategy for MerkleProof
source§impl Debug for MerkleProof
impl Debug for MerkleProof
source§impl Default for MerkleProof
impl Default for MerkleProof
source§fn default() -> MerkleProof
fn default() -> MerkleProof
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for MerkleProof
impl<'de> Deserialize<'de> for MerkleProof
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for MerkleProof
impl Hash for MerkleProof
source§impl Ord for MerkleProof
impl Ord for MerkleProof
source§fn cmp(&self, other: &MerkleProof) -> Ordering
fn cmp(&self, other: &MerkleProof) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for MerkleProof
impl PartialEq for MerkleProof
source§fn eq(&self, other: &MerkleProof) -> bool
fn eq(&self, other: &MerkleProof) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MerkleProof
impl PartialOrd for MerkleProof
source§fn partial_cmp(&self, other: &MerkleProof) -> Option<Ordering>
fn partial_cmp(&self, other: &MerkleProof) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for MerkleProof
impl Serialize for MerkleProof
source§impl StrictDecode for MerkleProof
impl StrictDecode for MerkleProof
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl StrictEncode for MerkleProof
impl StrictEncode for MerkleProof
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
source§impl StrictStruct for MerkleProof
impl StrictStruct for MerkleProof
const ALL_FIELDS: &'static [&'static str] = _
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for MerkleProof
impl StrictType for MerkleProof
const STRICT_LIB_NAME: &'static str = LIB_NAME_COMMIT_VERIFY
fn strict_name() -> Option<TypeName>
impl Eq for MerkleProof
impl Proof for MerkleProof
impl StrictProduct for MerkleProof
impl StructuralEq for MerkleProof
impl StructuralPartialEq for MerkleProof
Auto Trait Implementations§
impl RefUnwindSafe for MerkleProof
impl Send for MerkleProof
impl Sync for MerkleProof
impl Unpin for MerkleProof
impl UnwindSafe for MerkleProof
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
source§impl<T> CommitEncode for T
impl<T> CommitEncode for T
source§fn commit_encode(&self, e: &mut impl Write)
fn commit_encode(&self, e: &mut impl Write)
Encodes the data for the commitment by writing them directly into a
io::Write
writer instance§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.