Skip to main content

DecideSink

Trait DecideSink 

Source
pub trait DecideSink:
    Send
    + Sync
    + Debug {
    // Required methods
    fn append<'life0, 'async_trait>(
        &'life0 self,
        info: BlockInfo<SeqTypes>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn block_height<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn append<'life0, 'async_trait>( &'life0 self, info: BlockInfo<SeqTypes>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

The first height a resuming node has to append.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl DecideSink for NullEventConsumer

Without a query module there is nowhere to store decided blocks, so a node that hands them here fails on the first one instead of reporting progress it never persisted.

Source§

fn append<'life0, 'async_trait>( &'life0 self, info: BlockInfo<SeqTypes>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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

Source§

impl<T> DecideSink for Box<T>
where T: DecideSink + ?Sized,

Source§

fn append<'life0, 'async_trait>( &'life0 self, info: BlockInfo<SeqTypes>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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

Implementors§

Source§

impl<D> DecideSink for ApiEventConsumer<D>
where D: SequencerDataSource + UpdateAvailabilityData<SeqTypes> + Debug + Send + Sync + 'static,