Trait Inverse

Source
pub trait Inverse<O: Op> {
    // Required method
    fn inv(self) -> Self;
}
Expand description

Trait used to define the inverse element relative to the given operator.

The operator, e.g., Multiplicative or Additive, is identified by the type parameter O.

Required Methods§

Source

fn inv(self) -> Self

Returns the inverse of self, relative to the operator O.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> Inverse<Additive> for T
where T: Neg<Output = T>,

Source§

impl<T> Inverse<Multiplicative> for T
where T: Recip<Result = T>,