Trait cgats::PartialAdd
source · pub trait PartialAdd<Rhs: Sized>: Sized {
type Output;
fn partial_add(&self, rhs: &Rhs) -> Option<Self::Output>;
}
Expand description
Trait to add values that may or may not be compatible.
Returns None
if either value is not a type that can add.
Required Associated Types
Required Methods
sourcefn partial_add(&self, rhs: &Rhs) -> Option<Self::Output>
fn partial_add(&self, rhs: &Rhs) -> Option<Self::Output>
Try to add the two values