pub trait Subtractor {
// Required method
fn subtract(
&self,
operand: &(dyn Aggregator + Send + Sync),
result: &(dyn Aggregator + Send + Sync),
descriptor: &Descriptor,
) -> Result<()>;
}
Available on crate feature
metrics
only.Expand description
An optional interface implemented by some Aggregators. An Aggregator must
support subtract()
in order to be configured for a Precomputed-Sum
instrument (SumObserver, UpDownSumObserver) using a DeltaExporter.
Required Methods§
Sourcefn subtract(
&self,
operand: &(dyn Aggregator + Send + Sync),
result: &(dyn Aggregator + Send + Sync),
descriptor: &Descriptor,
) -> Result<()>
fn subtract( &self, operand: &(dyn Aggregator + Send + Sync), result: &(dyn Aggregator + Send + Sync), descriptor: &Descriptor, ) -> Result<()>
Subtract subtracts the operand
from this Aggregator and outputs the value
in result
.