Skip to main content

EqualsPercentage

Trait EqualsPercentage 

Source
pub trait EqualsPercentage {
    // Required method
    fn equals_percentage(&self, v: CSSFloat) -> bool;
}
Expand description

Check if this equal to a specific percentage.

Required Methods§

Source

fn equals_percentage(&self, v: CSSFloat) -> bool

Returns true if this is a specific percentage value. This should exclude calc() even if it only contains percentage component.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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

Source§

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