pub struct StaticBitcoinHeaderSource { /* private fields */ }Expand description
In-memory BitcoinHeaderSource backed by an operator-supplied
(height -> header_bytes) map. The CLI loads these from a
--bitcoin-header file before invoking the verifier.
Implementations§
Source§impl StaticBitcoinHeaderSource
impl StaticBitcoinHeaderSource
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Construct an empty source. Use Self::with_header to add
known headers.
Sourcepub fn with_header(self, height: u64, header_bytes: Vec<u8>) -> Self
pub fn with_header(self, height: u64, header_bytes: Vec<u8>) -> Self
Register a height-to-header pair.
Trait Implementations§
Source§impl Clone for StaticBitcoinHeaderSource
impl Clone for StaticBitcoinHeaderSource
Source§fn clone(&self) -> StaticBitcoinHeaderSource
fn clone(&self) -> StaticBitcoinHeaderSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StaticBitcoinHeaderSource
impl Debug for StaticBitcoinHeaderSource
Source§impl Default for StaticBitcoinHeaderSource
impl Default for StaticBitcoinHeaderSource
Source§fn default() -> StaticBitcoinHeaderSource
fn default() -> StaticBitcoinHeaderSource
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StaticBitcoinHeaderSource
impl RefUnwindSafe for StaticBitcoinHeaderSource
impl Send for StaticBitcoinHeaderSource
impl Sync for StaticBitcoinHeaderSource
impl Unpin for StaticBitcoinHeaderSource
impl UnsafeUnpin for StaticBitcoinHeaderSource
impl UnwindSafe for StaticBitcoinHeaderSource
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