Skip to main content

gather

Function gather 

Source
pub fn gather(parts: &[Share]) -> Share
Expand description

Adds shares that were divided out of one whole.

A free function rather than an Add impl, and it takes the parts together rather than two at a time: this is how a branch reports what its leaves came to, not an arithmetic anyone may reach for. The sum saturates at the whole, which is unreachable for parts of one plan and is the honest answer for a caller that mixed two.