Skip to main content

Gray

Trait Gray 

Source
pub trait Gray:
    Copy
    + Send
    + Sync
    + Sealed {
    // Required method
    fn to_gray(self) -> f64;

    // Provided method
    fn as_f64_slice(image: &[Self]) -> Option<&[f64]> { ... }
}
Expand description

A gray sample the detector can read.

Required Methods§

Source

fn to_gray(self) -> f64

The sample on the gray scale the detector’s thresholds are calibrated for.

Provided Methods§

Source

fn as_f64_slice(image: &[Self]) -> Option<&[f64]>

The buffer itself when it already holds f64 grays.

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 Gray for f32

Source§

fn to_gray(self) -> f64

Source§

impl Gray for f64

Source§

fn to_gray(self) -> f64

Source§

fn as_f64_slice(image: &[Self]) -> Option<&[f64]>

Source§

impl Gray for u8

Source§

fn to_gray(self) -> f64

Source§

impl Gray for u16

Source§

fn to_gray(self) -> f64

Implementors§