Trait SegmentAttributesMerger

Source
pub trait SegmentAttributesMerger: Send + Sync {
    // Required methods
    fn merge_json(&self, segment_attributes_json: Vec<&Value>) -> Value;
    fn default(&self) -> Value;
}
Expand description

Allows to implement custom behaviour while merging SegmentAttributes of multiple segments.

Segment attributes are represented by serde_json::Value and may be set on commit or merge

Required Methods§

Source

fn merge_json(&self, segment_attributes_json: Vec<&Value>) -> Value

Implements merging of multiple segment attributes, used in merge

Source

fn default(&self) -> Value

Default value of segment attributes that set on Segment creation

Implementors§