Trait imageproc::definitions::Clamp

source ·
pub trait Clamp<T> {
    // Required method
    fn clamp(x: T) -> Self;
}
Expand description

A type to which we can clamp a value of type T. Implementations are not required to handle NaNs gracefully.

Required Methods§

source

fn clamp(x: T) -> Self

Clamp x to a valid value for this type.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Clamp<f32> for f32

source§

impl Clamp<f32> for u8

source§

fn clamp(x: f32) -> u8

source§

impl Clamp<f32> for u16

source§

impl Clamp<f64> for f64

source§

impl Clamp<f64> for u8

source§

fn clamp(x: f64) -> u8

source§

impl Clamp<f64> for u16

source§

impl Clamp<i8> for i8

source§

fn clamp(x: i8) -> i8

source§

impl Clamp<i16> for i16

source§

impl Clamp<i16> for u8

source§

fn clamp(x: i16) -> u8

source§

impl Clamp<i32> for i16

source§

impl Clamp<i32> for i32

source§

impl Clamp<i32> for u8

source§

fn clamp(x: i32) -> u8

source§

impl Clamp<i32> for u16

source§

impl Clamp<i64> for i64

source§

impl Clamp<u8> for u8

source§

fn clamp(x: u8) -> u8

source§

impl Clamp<u16> for u8

source§

fn clamp(x: u16) -> u8

source§

impl Clamp<u16> for u16

source§

impl Clamp<u32> for u8

source§

fn clamp(x: u32) -> u8

source§

impl Clamp<u32> for u32

source§

impl Clamp<u64> for u64

Implementors§