Trait cgats::PartialDiv

source ·
pub trait PartialDiv<Rhs: Sized>: Sized {
    type Output;

    // Required method
    fn partial_div(&self, rhs: &Rhs) -> Option<Self::Output>;
}
Expand description

Trait to divide values that may not be compatible.

Required Associated Types§

source

type Output

The output of a successful division

Required Methods§

source

fn partial_div(&self, rhs: &Rhs) -> Option<Self::Output>

Divides the values. Returns None if either value is not a type that can divide.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl PartialDiv<f32> for f32

§

type Output = f32

source§

fn partial_div(&self, rhs: &Self) -> Option<Self::Output>

source§

impl PartialDiv<usize> for f32

§

type Output = f32

source§

fn partial_div(&self, rhs: &usize) -> Option<Self::Output>

Implementors§