Skip to main content

PrepareReference

Trait PrepareReference 

Source
pub trait PrepareReference: Metric {
    type Prepared<'a>: WarmReference<Output = Self::Output>
       where Self: 'a;

    // Required method
    fn warm_reference(
        &mut self,
        reference: &PixelView<'_>,
        opts: EvalOpts<'_>,
    ) -> MetricResult<Self::Prepared<'_>>;
}
Expand description

Optional actual reference precomputation, never implicit cold replay.

Required Associated Types§

Source

type Prepared<'a>: WarmReference<Output = Self::Output> where Self: 'a

Retained work may borrow the scorer, but not the input or preparation pulse. Each subsequent evaluation receives fresh controls.

Required Methods§

Source

fn warm_reference( &mut self, reference: &PixelView<'_>, opts: EvalOpts<'_>, ) -> MetricResult<Self::Prepared<'_>>

Prepare work preserving cold-result scalar bits.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<M: PrepareReference + ?Sized> PrepareReference for Box<M>

Source§

type Prepared<'a> = <M as PrepareReference>::Prepared<'a> where Self: 'a

Source§

fn warm_reference( &mut self, r: &PixelView<'_>, opts: EvalOpts<'_>, ) -> MetricResult<Self::Prepared<'_>>

Implementors§

Source§

impl<M: NoReferenceMetric> PrepareReference for PairedNoReference<M>

Source§

type Prepared<'a> = PairedReference<'a, M> where Self: 'a

Source§

impl<M: PrepareReference> PrepareReference for Erased<M>
where M::Output: 'static,

Source§

type Prepared<'a> = Erased<<M as PrepareReference>::Prepared<'a>> where Self: 'a