Trait serai_processor::networks::Block

source ·
pub trait Block<N: Network>: Send + Sync + Sized + Clone + Debug {
    type Id: 'static + Id;

    // Required methods
    fn id(&self) -> Self::Id;
    fn parent(&self) -> Self::Id;
    fn time<'life0, 'life1, 'async_trait>(
        &'life0 self,
        rpc: &'life1 N,
    ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Associated Types§

source

type Id: 'static + Id

Required Methods§

source

fn id(&self) -> Self::Id

source

fn parent(&self) -> Self::Id

source

fn time<'life0, 'life1, 'async_trait>( &'life0 self, rpc: &'life1 N, ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The monotonic network time at this block.

This call is presumed to be expensive and should only be called sparingly.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Block<Bitcoin> for Block

§

type Id = [u8; 32]

source§

fn id(&self) -> Self::Id

source§

fn parent(&self) -> Self::Id

source§

fn time<'life0, 'life1, 'async_trait>( &'life0 self, rpc: &'life1 Bitcoin, ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

impl Block<Monero> for Block

§

type Id = [u8; 32]

source§

fn id(&self) -> Self::Id

source§

fn parent(&self) -> Self::Id

source§

fn time<'life0, 'life1, 'async_trait>( &'life0 self, rpc: &'life1 Monero, ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

source§

impl<D: Db> Block<Ethereum<D>> for Epoch

§

type Id = [u8; 32]