PayloadAttributesBuilder

Trait PayloadAttributesBuilder 

Source
pub trait PayloadAttributesBuilder<Attributes>:
    Send
    + Sync
    + 'static {
    // Required method
    fn build(&self, timestamp: u64) -> Attributes;
}
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§

Source

fn build(&self, timestamp: u64) -> Attributes

Constructs new payload attributes for the given timestamp.

Trait Implementations§

Source§

impl<Attributes> PayloadAttributesBuilder<Attributes> for Box<dyn PayloadAttributesBuilder<Attributes>>
where Attributes: 'static,

Source§

fn build(&self, timestamp: u64) -> Attributes

Constructs new payload attributes for the given timestamp.

Implementations on Foreign Types§

Source§

impl<Attributes> PayloadAttributesBuilder<Attributes> for Box<dyn PayloadAttributesBuilder<Attributes>>
where Attributes: 'static,

Source§

fn build(&self, timestamp: u64) -> Attributes

Source§

impl<Attributes, L, R> PayloadAttributesBuilder<Attributes> for Either<L, R>
where L: PayloadAttributesBuilder<Attributes>, R: PayloadAttributesBuilder<Attributes>,

Source§

fn build(&self, timestamp: u64) -> Attributes

Implementors§

Source§

impl<Attributes, F> PayloadAttributesBuilder<Attributes> for F
where F: Fn(u64) -> Attributes + Send + Sync + 'static,