Trait mergable::Aggregatable [−][src]
pub trait Aggregatable: Clone {
fn join(this: &mut Self, that: Self);
fn join_ref(this: &mut Self, that: &Self) { ... }
fn canonicalize(_: &mut Self) { ... }
}
Required methods
Provided methods
fn canonicalize(_: &mut Self)
fn canonicalize(_: &mut Self)
Fix non-associative types.
- If
join
is not associative this method can be used to ensure that the same result is obtained irrespective of the join order. Note that this trait can be used even ifcanonicalize(join(a, b))
is not identical tocanonicalize(join(b, a))
however it means that results will differ for different actors. - This method will not necessarily be called after every join, it will only be called before returning the value to the client. If you need to do a canonicalization after every join do it in
join
.