pub unsafe trait GammaLutOutput: Sealed {
type TableValue;
const MAX: Self;
const BITS: u32;
const MAN_INDEX_WIDTH: u32;
// Required methods
fn from_table_value(value: Self::TableValue) -> Self;
unsafe fn lookup(
linear: f32,
linear_slope: f32,
min_float_bits: u32,
table: &[Self::TableValue],
) -> Self;
}Expand description
Required Associated Constants§
Sourceconst MAN_INDEX_WIDTH: u32
const MAN_INDEX_WIDTH: u32
The number of mantissa bits used to index into the lookup table.
Required Associated Types§
Sourcetype TableValue
type TableValue
The type of values stored in the lookup table.
Required Methods§
Sourcefn from_table_value(value: Self::TableValue) -> Self
fn from_table_value(value: Self::TableValue) -> Self
Convert a table value to Self.
This is called in the final stage of the lookup, when the table value is
expected to be in range for Self.
Sourceunsafe fn lookup(
linear: f32,
linear_slope: f32,
min_float_bits: u32,
table: &[Self::TableValue],
) -> Self
unsafe fn lookup( linear: f32, linear_slope: f32, min_float_bits: u32, table: &[Self::TableValue], ) -> Self
Look up a value of this output type, called by GammaLut.
§Safety
The lookup algorithm may assume certain properties and values from the
input, such as range and table length. These invariants are upheld by
GammaLut and GammaLutBuilder.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.