pub trait FitnessDistance<Subject> {
type Error;
// Required method
fn fitness_distance(&self, subject: Subject) -> Result<f64, Self::Error>;
}
Expand description
The function used to compute the “fitness distance” of a setting value of a MediaStreamTrack
object.
§W3C Spec Compliance
The trait corresponds to the “fitness distance” function in the W3C “Media Capture and Streams” spec.
Required Associated Types§
Required Methods§
Sourcefn fitness_distance(&self, subject: Subject) -> Result<f64, Self::Error>
fn fitness_distance(&self, subject: Subject) -> Result<f64, Self::Error>
Computes the fitness distance of the given subject
in the range of 0.0..=1.0
.
A distance of 0.0
denotes it maximally fit, one of 1.0
as maximally unfit.