Trait style::Zero

source ·
pub trait Zero {
    // Required methods
    fn zero() -> Self;
    fn is_zero(&self) -> bool;
}
Expand description

A trait pretty much similar to num_traits::Zero, but without the need of implementing Add.

Required Methods§

source

fn zero() -> Self

Returns the zero value.

source

fn is_zero(&self) -> bool

Returns whether this value is zero.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Zero for AngleDimension

source§

impl Zero for Length

source§

impl Zero for style::values::specified::length::LengthPercentage

source§

impl Zero for NoCalcLength

source§

impl Zero for style::values::computed::angle::Angle

source§

impl Zero for style::values::computed::length_percentage::LengthPercentage

source§

impl Zero for Percentage

source§

impl Zero for style::values::computed::time::Time

source§

impl Zero for style::values::specified::angle::Angle

source§

impl Zero for Integer

source§

impl Zero for Number

source§

impl Zero for style::values::specified::time::Time

source§

impl<L, N: Zero> Zero for LengthOrNumber<L, N>

source§

impl<L: Zero> Zero for BorderCornerRadius<L>

source§

impl<L: Zero> Zero for BorderRadius<L>

source§

impl<L: Zero> Zero for Size2D<L>

source§

impl<LengthPercentage: Zero> Zero for LengthPercentageOrAuto<LengthPercentage>

source§

impl<N> Zero for Ratio<N>
where N: Zero + One,

source§

impl<T> Zero for T
where T: Zero,

source§

impl<T: Zero> Zero for AnimationDuration<T>

source§

impl<T: Zero> Zero for NonNegative<T>