[][src]Struct ibc_proto::InnerSpec

pub struct InnerSpec {
    pub child_order: Vec<i32>,
    pub child_size: i32,
    pub min_prefix_length: i32,
    pub max_prefix_length: i32,
    pub empty_child: Vec<u8>,
    pub hash: i32,
}

InnerSpec contains all store-specific structure info to determine if two proofs from a given store are neighbors.

This enables:

isLeftMost(spec: InnerSpec, op: InnerOp) isRightMost(spec: InnerSpec, op: InnerOp) isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)

Fields

child_order: Vec<i32>

Child order is the ordering of the children node, must count from 0 iavl tree is [0, 1] (left then right) merk is [0, 2, 1] (left, right, here)

child_size: i32min_prefix_length: i32max_prefix_length: i32empty_child: Vec<u8>

empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)

hash: i32

hash is the algorithm that must be used for each InnerOp

Implementations

impl InnerSpec[src]

pub fn hash(&self) -> HashOp[src]

Returns the enum value of hash, or the default if the field is set to an invalid enum value.

pub fn set_hash(&mut self, value: HashOp)[src]

Sets hash to the provided enum value.

Trait Implementations

impl Clone for InnerSpec[src]

impl Debug for InnerSpec[src]

impl Default for InnerSpec[src]

impl Message for InnerSpec[src]

impl PartialEq<InnerSpec> for InnerSpec[src]

impl StructuralPartialEq for InnerSpec[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.