Skip to main content

SquaredError

Trait SquaredError 

Source
pub trait SquaredError<R = Self> {
    type Output;

    // Required method
    fn squared_error(self, rhs: R) -> Self::Output;

    // Provided method
    fn _apply(self, rhs: R) -> Self::Output
       where Self: Sized { ... }
}
Expand description

trait to represent the operation

Required Associated Types§

Source

type Output

the output type

Required Methods§

Source

fn squared_error(self, rhs: R) -> Self::Output

computes the operation

Provided Methods§

Source

fn _apply(self, rhs: R) -> Self::Output
where Self: Sized,

macro convenience version of the primary method

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SquaredError for f32

Source§

type Output = f32

Source§

fn squared_error(self, rhs: f32) -> Self::Output

Implementors§