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) -> u16
pub fn pos(&self) -> u16
Method returning copy of MerkleProof::pos field.
Position of the leaf in the tree.
source§impl MerkleProof
impl MerkleProof
sourcepub fn into_path(self) -> SmallVec<MerkleNode>
pub fn into_path(self) -> SmallVec<MerkleNode>
Converts the proof into inner merkle path representation
sourcepub fn to_path(&self) -> SmallVec<MerkleNode>
pub fn to_path(&self) -> SmallVec<MerkleNode>
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, UnrelatedProof>
pub fn convolve( &self, protocol_id: ProtocolId, message: Message ) -> Result<Commitment, UnrelatedProof>
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 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<MerkleProof> for MerkleProof
impl PartialEq<MerkleProof> 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<MerkleProof> for MerkleProof
impl PartialOrd<MerkleProof> 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>
source§impl StrictEncode for MerkleProof
impl StrictEncode for MerkleProof
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.