Trait palette::num::ClampAssign

source ·
pub trait ClampAssign {
    // Required methods
    fn clamp_assign(&mut self, min: Self, max: Self);
    fn clamp_min_assign(&mut self, min: Self);
    fn clamp_max_assign(&mut self, max: Self);
}
Expand description

Assigning trait for clamping a value.

Required Methods§

source

fn clamp_assign(&mut self, min: Self, max: Self)

Clamp self to be within the range [min, max].

source

fn clamp_min_assign(&mut self, min: Self)

Clamp self to be within the range [min, ∞).

source

fn clamp_max_assign(&mut self, max: Self)

Clamp self to be within the range (-∞, max].

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ClampAssign for f32

source§

fn clamp_assign(&mut self, min: Self, max: Self)

source§

fn clamp_min_assign(&mut self, min: Self)

source§

fn clamp_max_assign(&mut self, max: Self)

source§

impl ClampAssign for f64

source§

fn clamp_assign(&mut self, min: Self, max: Self)

source§

fn clamp_min_assign(&mut self, min: Self)

source§

fn clamp_max_assign(&mut self, max: Self)

source§

impl ClampAssign for u8

source§

fn clamp_assign(&mut self, min: Self, max: Self)

source§

fn clamp_min_assign(&mut self, min: Self)

source§

fn clamp_max_assign(&mut self, max: Self)

source§

impl ClampAssign for u16

source§

fn clamp_assign(&mut self, min: Self, max: Self)

source§

fn clamp_min_assign(&mut self, min: Self)

source§

fn clamp_max_assign(&mut self, max: Self)

source§

impl ClampAssign for u32

source§

fn clamp_assign(&mut self, min: Self, max: Self)

source§

fn clamp_min_assign(&mut self, min: Self)

source§

fn clamp_max_assign(&mut self, max: Self)

source§

impl ClampAssign for u64

source§

fn clamp_assign(&mut self, min: Self, max: Self)

source§

fn clamp_min_assign(&mut self, min: Self)

source§

fn clamp_max_assign(&mut self, max: Self)

source§

impl ClampAssign for u128

source§

fn clamp_assign(&mut self, min: Self, max: Self)

source§

fn clamp_min_assign(&mut self, min: Self)

source§

fn clamp_max_assign(&mut self, max: Self)

Implementors§