reth_payload_builder_primitives

Trait PayloadStoreExt

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

    // Provided method
    fn resolve<'life0, 'async_trait>(
        &'life0 self,
        id: PayloadId,
    ) -> Pin<Box<dyn Future<Output = Option<Result<T::BuiltPayload, PayloadBuilderError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

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

Required Methods§

Source

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

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

Source

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

Returns the best payload for the given identifier.

Source

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

Returns the payload attributes associated with the given identifier.

Provided Methods§

Source

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

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

Implementors§

Source§

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