reth::builder::payload

Trait PayloadStoreExt

pub trait PayloadStoreExt<T>:
    Debug
    + Send
    + Sync
    + Unpin
where T: PayloadTypes,
{ // Required methods fn resolve_kind<'life0, 'async_trait>( &'life0 self, id: PayloadId, kind: PayloadKind, ) -> Pin<Box<dyn Future<Output = Option<Result<<T as PayloadTypes>::BuiltPayload, PayloadBuilderError>>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn best_payload<'life0, 'async_trait>( &'life0 self, id: PayloadId, ) -> Pin<Box<dyn Future<Output = Option<Result<<T as PayloadTypes>::BuiltPayload, PayloadBuilderError>>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn payload_attributes<'life0, 'async_trait>( &'life0 self, id: PayloadId, ) -> Pin<Box<dyn Future<Output = Option<Result<<T as PayloadTypes>::PayloadBuilderAttributes, PayloadBuilderError>>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; // Provided method fn resolve<'life0, 'async_trait>( &'life0 self, id: PayloadId, ) -> Pin<Box<dyn Future<Output = Option<Result<<T as PayloadTypes>::BuiltPayload, PayloadBuilderError>>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait { ... } }
Expand description

A helper trait for internal usage to retrieve and resolve payloads.

Required Methods§

fn resolve_kind<'life0, 'async_trait>( &'life0 self, id: PayloadId, kind: PayloadKind, ) -> Pin<Box<dyn Future<Output = Option<Result<<T as PayloadTypes>::BuiltPayload, PayloadBuilderError>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Resolves the payload job and returns the best payload that has been built so far.

fn best_payload<'life0, 'async_trait>( &'life0 self, id: PayloadId, ) -> Pin<Box<dyn Future<Output = Option<Result<<T as PayloadTypes>::BuiltPayload, PayloadBuilderError>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns the best payload for the given identifier.

fn payload_attributes<'life0, 'async_trait>( &'life0 self, id: PayloadId, ) -> Pin<Box<dyn Future<Output = Option<Result<<T as PayloadTypes>::PayloadBuilderAttributes, PayloadBuilderError>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns the payload attributes associated with the given identifier.

Provided Methods§

fn resolve<'life0, 'async_trait>( &'life0 self, id: PayloadId, ) -> Pin<Box<dyn Future<Output = Option<Result<<T as PayloadTypes>::BuiltPayload, PayloadBuilderError>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Resolves the payload job as fast and possible and returns the best payload that has been built so far.

Implementors§

§

impl<T, P> PayloadStoreExt<T> for P
where T: PayloadTypes, P: PayloadBuilder<PayloadType = T>,