pub struct HeaderArray<'a>(/* private fields */);Expand description
A slice of Hash256Digests for use in a merkle array
Implementations§
Source§impl<'a> HeaderArray<'a>
impl<'a> HeaderArray<'a>
Source§impl HeaderArray<'_>
impl HeaderArray<'_>
Sourcepub fn index(&self, index: usize) -> RawHeader
pub fn index(&self, index: usize) -> RawHeader
Index into the merkle array. This does not protect you from overruns, which may result in panics.
Sourcepub fn valid_difficulty(
&self,
constant_difficulty: bool,
) -> Result<U256, SPVError>
pub fn valid_difficulty( &self, constant_difficulty: bool, ) -> Result<U256, SPVError>
Validate the header array. Return either the accumulated difficulty, or an error
Sourcepub fn iter(&self) -> HeaderArrayIter<'_> ⓘ
pub fn iter(&self) -> HeaderArrayIter<'_> ⓘ
Return a new iterator for the header array.
Trait Implementations§
Source§impl<'a> Clone for HeaderArray<'a>
impl<'a> Clone for HeaderArray<'a>
Source§fn clone(&self) -> HeaderArray<'a>
fn clone(&self) -> HeaderArray<'a>
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 HeaderArray<'_>
impl Debug for HeaderArray<'_>
Source§impl<'a> Hash for HeaderArray<'a>
impl<'a> Hash for HeaderArray<'a>
Source§impl<'a> PartialEq for HeaderArray<'a>
impl<'a> PartialEq for HeaderArray<'a>
impl<'a> Eq for HeaderArray<'a>
impl<'a> StructuralPartialEq for HeaderArray<'a>
Auto Trait Implementations§
impl<'a> Freeze for HeaderArray<'a>
impl<'a> RefUnwindSafe for HeaderArray<'a>
impl<'a> Send for HeaderArray<'a>
impl<'a> Sync for HeaderArray<'a>
impl<'a> Unpin for HeaderArray<'a>
impl<'a> UnwindSafe for HeaderArray<'a>
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