cosmic::cosmic_theme::palette::num

Trait IsValidDivisor

source
pub trait IsValidDivisor: HasBoolMask {
    // Required method
    fn is_valid_divisor(&self) -> Self::Mask;
}
Expand description

Methods for checking if a number can be used as a divisor.

Required Methods§

source

fn is_valid_divisor(&self) -> Self::Mask

Return true if self can be used as a divisor in x / self.

This checks that division by self will result in a finite and defined value. Integers check for self != 0, while floating point types call is_normal.

Implementations on Foreign Types§

source§

impl IsValidDivisor for f32

source§

impl IsValidDivisor for f64

source§

impl IsValidDivisor for u8

source§

impl IsValidDivisor for u16

source§

impl IsValidDivisor for u32

source§

impl IsValidDivisor for u64

source§

impl IsValidDivisor for u128

Implementors§