pub trait TryOp: Sized {
    fn try_op<F: FnOnce(f32, f32) -> f32>(
        &self,
        rhs: &Self,
        op: F
    ) -> Option<Self>; fn try_op_to<T, F: FnOnce(f32, f32) -> T>(
        &self,
        rhs: &Self,
        op: F
    ) -> Option<T>; }
Expand description

A trait for values that potentially support a binary operation (e.g. if they have the same unit).

Required Methods

Returns the result of the operation in the same type, if possible.

Returns the result of the operation in a different type, if possible.

Implementors