Skip to main content

Evaluation

Trait Evaluation 

Source
pub trait Evaluation {
    // Required method
    fn scores(&self) -> impl Iterator<Item = Score<'_>>;

    // Provided methods
    fn visit_scores<'a>(&'a self, visitor: &mut dyn FnMut(Score<'a>)) { ... }
    fn visit_maps<'a>(&'a self, visitor: &mut dyn FnMut(MapView<'a>)) { ... }
    fn maps(&self) -> impl Iterator<Item = MapView<'_>> { ... }
}
Expand description

Common access to a concrete assessment. Additional native fields remain accessible on its concrete type. Iteration need not allocate. A successful assessment has at least one uniquely named score, in stable output order.

Required Methods§

Source

fn scores(&self) -> impl Iterator<Item = Score<'_>>

All scalar outputs and their semantics, headline first when applicable.

Provided Methods§

Source

fn visit_scores<'a>(&'a self, visitor: &mut dyn FnMut(Score<'a>))

Visit scores without allocating an erased iterator. Implementations overriding this method must expose exactly the same order and values.

Source

fn visit_maps<'a>(&'a self, visitor: &mut dyn FnMut(MapView<'a>))

Visit maps without allocating an erased iterator, with the same views and order as Self::maps.

Source

fn maps(&self) -> impl Iterator<Item = MapView<'_>>

Borrow native map planes when diagnostics were requested. The default publishes none; a metric without diagnostics must refuse a request. Native fields remain accessible even when no common map view is exposed.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§