Skip to main content

Aggregate

Trait Aggregate 

Source
pub trait Aggregate:
    Clone
    + Debug
    + Serialize
    + DeserializeOwned {
    // Required methods
    fn identity() -> Self;
    fn combine(self, other: Self) -> Self;

    // Provided methods
    fn supports_witnesses() -> bool { ... }
    fn contributes_to_witnesses(_config_value: &Self, _total: &Self) -> bool { ... }
}
Expand description

Foldable aggregate values for enumerating a problem’s configuration space.

Required Methods§

Source

fn identity() -> Self

Neutral element for folding.

Source

fn combine(self, other: Self) -> Self

Associative combine operation.

Provided Methods§

Source

fn supports_witnesses() -> bool

Whether this aggregate admits representative witness configurations.

Source

fn contributes_to_witnesses(_config_value: &Self, _total: &Self) -> bool

Whether a configuration-level value belongs to the witness set for the final aggregate value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§