pub struct Trace(/* private fields */);Expand description
A trace of the light blocks that were used by the light client to verify a particular header, in the case of bisection or sequential verification.
The trace always contains at least two light blocks, the trusted block and the target block.
Implementations§
Source§impl Trace
impl Trace
pub fn new(trace: Vec<LightBlock>) -> Result<Self, Error>
pub fn first(&self) -> &LightBlock
pub fn last(&self) -> &LightBlock
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> Iter<'_, LightBlock>
pub fn into_vec(self) -> Vec<LightBlock>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Trace
impl RefUnwindSafe for Trace
impl Send for Trace
impl Sync for Trace
impl Unpin for Trace
impl UnwindSafe for Trace
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