Skip to main content

TransferFunction

Trait TransferFunction 

Source
pub trait TransferFunction {
    type Input: Copy;
    type Output: Copy;

    // Required method
    fn convert(
        &self,
        input: Self::Input,
    ) -> Result<Self::Output, TransferError<Self::Input>>;
}
Expand description

A conversion from an observation to a measurement.

Required Associated Types§

Source

type Input: Copy

Input observation type.

Source

type Output: Copy

Output measurement type.

Required Methods§

Source

fn convert( &self, input: Self::Input, ) -> Result<Self::Output, TransferError<Self::Input>>

Convert an observation to a measurement.

When a table declares an ObservationGuard, that exact code is classified first. Remaining inputs outside the table domain follow the table’s explicit lower and upper BoundaryBehavior settings. Transfer functions never extrapolate.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§