pub struct Web3Dater { /* private fields */ }
Expand description
Web3Dater is using web3
client that allows to get block by date.
Implementations§
Source§impl Web3Dater
impl Web3Dater
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clears the cache of blocks.
Sourcepub async fn get_block_by_date(
&mut self,
date: DateTime<FixedOffset>,
after: bool,
) -> Result<Block<H256>, Error>
pub async fn get_block_by_date( &mut self, date: DateTime<FixedOffset>, after: bool, ) -> Result<Block<H256>, Error>
Get the closest block to the given date.
after
is a flag that indicates whether the block should be after or before the given date.
Auto Trait Implementations§
impl Freeze for Web3Dater
impl !RefUnwindSafe for Web3Dater
impl Send for Web3Dater
impl Sync for Web3Dater
impl Unpin for Web3Dater
impl !UnwindSafe for Web3Dater
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