pub struct FilterCache { /* private fields */ }Implementations§
Source§impl FilterCache
impl FilterCache
pub fn new(genesis: FilterHeader) -> Self
pub fn from(headers: NonEmpty<(FilterHash, FilterHeader)>) -> Self
Trait Implementations§
Source§impl Clone for FilterCache
impl Clone for FilterCache
Source§fn clone(&self) -> FilterCache
fn clone(&self) -> FilterCache
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 FilterCache
impl Debug for FilterCache
Source§impl Filters for FilterCache
impl Filters for FilterCache
Source§fn 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.
Source§fn get_headers(
&self,
range: RangeInclusive<Height>,
) -> Vec<(FilterHash, FilterHeader)>
fn get_headers( &self, range: RangeInclusive<Height>, ) -> Vec<(FilterHash, FilterHeader)>
Get filter headers given a block height range.
Source§fn 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.
Source§fn tip(&self) -> (&FilterHash, &FilterHeader)
fn tip(&self) -> (&FilterHash, &FilterHeader)
Get the tip of the filter header chain.
Source§fn rollback(&mut self, height: Height) -> Result<(), Error>
fn rollback(&mut self, height: Height) -> Result<(), Error>
Rollback filter chain to the given height.
Source§fn 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 Freeze for FilterCache
impl RefUnwindSafe for FilterCache
impl Send for FilterCache
impl Sync for FilterCache
impl Unpin for FilterCache
impl UnsafeUnpin for FilterCache
impl UnwindSafe for FilterCache
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