pub trait PayloadAttributesBuilder<Attributes, Header = Header>:
Send
+ Sync
+ 'static {
// Required method
fn build(&self, parent: &SealedHeader<Header>) -> Attributes;
}Available on crate feature
node-api only.Expand description
Factory trait for creating payload attributes.
Enables different strategies for generating payload attributes based on contextual information. Useful for testing and specialized building.
Required Methods§
Sourcefn build(&self, parent: &SealedHeader<Header>) -> Attributes
fn build(&self, parent: &SealedHeader<Header>) -> Attributes
Constructs new payload attributes for the given timestamp.
Trait Implementations§
Source§impl<Attributes, Header> PayloadAttributesBuilder<Attributes, Header> for Box<dyn PayloadAttributesBuilder<Attributes, Header>>where
Header: 'static,
Attributes: 'static,
impl<Attributes, Header> PayloadAttributesBuilder<Attributes, Header> for Box<dyn PayloadAttributesBuilder<Attributes, Header>>where
Header: 'static,
Attributes: 'static,
Source§fn build(&self, parent: &SealedHeader<Header>) -> Attributes
fn build(&self, parent: &SealedHeader<Header>) -> Attributes
Constructs new payload attributes for the given timestamp.