Struct nakamoto_test::block::cache::model::FilterCache
source · pub struct FilterCache { /* private fields */ }
Implementations
sourceimpl FilterCache
impl FilterCache
pub fn new(genesis: FilterHeader) -> Self
pub fn from(headers: NonEmpty<(FilterHash, FilterHeader)>) -> Self
Trait Implementations
sourceimpl Clone for FilterCache
impl Clone for FilterCache
sourcefn clone(&self) -> FilterCache
fn clone(&self) -> FilterCache
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for FilterCache
impl Debug for FilterCache
sourceimpl Filters for FilterCache
impl Filters for FilterCache
sourcefn get_header(&self, height: Height) -> Option<(FilterHash, FilterHeader)>
fn get_header(&self, height: Height) -> Option<(FilterHash, FilterHeader)>
Get the filter header at the given height. Includes the hash of the filter itself.
sourcefn get_headers(
&self,
range: RangeInclusive<Height>
) -> Vec<(FilterHash, FilterHeader)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn get_headers(
&self,
range: RangeInclusive<Height>
) -> Vec<(FilterHash, FilterHeader)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Get filter headers given a block height range.
sourcefn import_headers(
&mut self,
headers: Vec<(FilterHash, FilterHeader)>
) -> Result<Height, Error>
fn import_headers(
&mut self,
headers: Vec<(FilterHash, FilterHeader)>
) -> Result<Height, Error>
Import filter headers.
sourcefn tip(&self) -> (&FilterHash, &FilterHeader)
fn tip(&self) -> (&FilterHash, &FilterHeader)
Get the tip of the filter header chain.
sourcefn rollback(&mut self, height: Height) -> Result<(), Error>
fn rollback(&mut self, height: Height) -> Result<(), Error>
Rollback filter chain to the given height.
sourcefn get_prev_header(&self, height: u64) -> Option<FilterHeader>
fn get_prev_header(&self, height: u64) -> Option<FilterHeader>
Get the filter header previous to the given height.
Auto Trait Implementations
impl RefUnwindSafe for FilterCache
impl Send for FilterCache
impl Sync for FilterCache
impl Unpin for FilterCache
impl UnwindSafe for FilterCache
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more