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§
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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,
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§
Sourcefn 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,
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.