Skip to main content

ToAbsoluteLength

Trait ToAbsoluteLength 

Source
pub trait ToAbsoluteLength {
    // Required method
    fn to_pixel_length(
        &self,
        containing_len: Option<ComputedLength>,
    ) -> Result<CSSFloat, ()>;
}
Expand description

Convert a length type into the absolute lengths.

Required Methods§

Source

fn to_pixel_length( &self, containing_len: Option<ComputedLength>, ) -> Result<CSSFloat, ()>

Returns the absolute length as pixel value.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl ToAbsoluteLength for style::values::specified::length::Length

Source§

impl ToAbsoluteLength for style::values::computed::length::Length

Source§

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

Source§

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