Skip to main content

Utility

Trait Utility 

Source
pub trait Utility<T> {
    // Required method
    fn utility(&self, obj: &T) -> f64;
}
Expand description

Implemented by objects that measure utility of an object.

Required Methods§

Source

fn utility(&self, obj: &T) -> f64

Computes the utility of an object.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T, U: Utility<T>> Utility<T> for Vec<U>

Sums up utility from multiple sub-terms.

Source§

fn utility(&self, obj: &T) -> f64

Implementors§