cosmic::cosmic_theme::palette::num

Trait 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: f32, max: f32)

source§

fn clamp_min_assign(&mut self, min: f32)

source§

fn clamp_max_assign(&mut self, max: f32)

source§

impl ClampAssign for f64

source§

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

source§

fn clamp_min_assign(&mut self, min: f64)

source§

fn clamp_max_assign(&mut self, max: f64)

source§

impl ClampAssign for u8

source§

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

source§

fn clamp_min_assign(&mut self, min: u8)

source§

fn clamp_max_assign(&mut self, max: u8)

source§

impl ClampAssign for u16

source§

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

source§

fn clamp_min_assign(&mut self, min: u16)

source§

fn clamp_max_assign(&mut self, max: u16)

source§

impl ClampAssign for u32

source§

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

source§

fn clamp_min_assign(&mut self, min: u32)

source§

fn clamp_max_assign(&mut self, max: u32)

source§

impl ClampAssign for u64

source§

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

source§

fn clamp_min_assign(&mut self, min: u64)

source§

fn clamp_max_assign(&mut self, max: u64)

source§

impl ClampAssign for u128

source§

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

source§

fn clamp_min_assign(&mut self, min: u128)

source§

fn clamp_max_assign(&mut self, max: u128)

Implementors§