pub struct InclusionProof {
pub proof_bytes: Vec<u8>,
pub block_hash: Hash,
pub position: u64,
}Expand description
Inclusion proof material
Fields§
§proof_bytes: Vec<u8>Merkle proof or equivalent
block_hash: HashBlock hash containing the commitment
position: u64Position in block (for verification)
Implementations§
Source§impl InclusionProof
impl InclusionProof
Sourcepub fn new(
proof_bytes: Vec<u8>,
block_hash: Hash,
position: u64,
) -> Result<Self, &'static str>
pub fn new( proof_bytes: Vec<u8>, block_hash: Hash, position: u64, ) -> Result<Self, &'static str>
Sourcepub fn new_unchecked(
proof_bytes: Vec<u8>,
block_hash: Hash,
position: u64,
) -> Self
pub fn new_unchecked( proof_bytes: Vec<u8>, block_hash: Hash, position: u64, ) -> Self
Create a new inclusion proof without validation.
§Safety
This bypasses size and structure validation. Use only for internal protocol conversions where the input is already known to be valid.
Sourcepub fn is_confirmed(&self, _required_depth: u32) -> bool
pub fn is_confirmed(&self, _required_depth: u32) -> bool
Check if confirmed with given depth
Trait Implementations§
Source§impl Clone for InclusionProof
impl Clone for InclusionProof
Source§fn clone(&self) -> InclusionProof
fn clone(&self) -> InclusionProof
Returns a duplicate 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 InclusionProof
impl Debug for InclusionProof
Source§impl<'de> Deserialize<'de> for InclusionProof
impl<'de> Deserialize<'de> for InclusionProof
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 PartialEq for InclusionProof
impl PartialEq for InclusionProof
Source§impl Serialize for InclusionProof
impl Serialize for InclusionProof
impl Eq for InclusionProof
impl StructuralPartialEq for InclusionProof
Auto Trait Implementations§
impl Freeze for InclusionProof
impl RefUnwindSafe for InclusionProof
impl Send for InclusionProof
impl Sync for InclusionProof
impl Unpin for InclusionProof
impl UnsafeUnpin for InclusionProof
impl UnwindSafe for InclusionProof
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