proof 0.0.0

Library for interacting with SSZ merkle tree proofs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::NodeIndex;
use crate::path::Path;

/// An enum of errors that can occur when interacting with proof.
#[derive(Debug, PartialEq)]
pub enum Error {
    // Invalid path element
    InvalidPath(Path),
    // The path accesses an unintialized element
    IndexOutOfBounds(u64),
    // Missing chunk
    ChunkNotLoaded(NodeIndex),
    // Path provided was empty
    EmptyPath(),
}

pub type Result<T> = std::result::Result<T, Error>;