Skip to main content

LengthExt

Trait LengthExt 

Source
pub trait LengthExt {
    // Required methods
    fn px(self) -> Length;
    fn em(self) -> Length;
    fn rem(self) -> Length;
    fn pct(self) -> Length;
    fn vw(self) -> Length;
    fn vh(self) -> Length;
    fn vmin(self) -> Length;
    fn vmax(self) -> Length;
    fn fr(self) -> Length;
}
Expand description

16.px(), 1.5.em(), 50.pct(), 1.fr(), …

Required Methods§

Source

fn px(self) -> Length

Source

fn em(self) -> Length

Source

fn rem(self) -> Length

Source

fn pct(self) -> Length

Source

fn vw(self) -> Length

Source

fn vh(self) -> Length

Source

fn vmin(self) -> Length

Source

fn vmax(self) -> Length

Source

fn fr(self) -> Length

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl LengthExt for f32

Source§

fn px(self) -> Length

Source§

fn em(self) -> Length

Source§

fn rem(self) -> Length

Source§

fn pct(self) -> Length

Source§

fn vw(self) -> Length

Source§

fn vh(self) -> Length

Source§

fn vmin(self) -> Length

Source§

fn vmax(self) -> Length

Source§

fn fr(self) -> Length

Source§

impl LengthExt for f64

Source§

fn px(self) -> Length

Source§

fn em(self) -> Length

Source§

fn rem(self) -> Length

Source§

fn pct(self) -> Length

Source§

fn vw(self) -> Length

Source§

fn vh(self) -> Length

Source§

fn vmin(self) -> Length

Source§

fn vmax(self) -> Length

Source§

fn fr(self) -> Length

Source§

impl LengthExt for i32

Source§

fn px(self) -> Length

Source§

fn em(self) -> Length

Source§

fn rem(self) -> Length

Source§

fn pct(self) -> Length

Source§

fn vw(self) -> Length

Source§

fn vh(self) -> Length

Source§

fn vmin(self) -> Length

Source§

fn vmax(self) -> Length

Source§

fn fr(self) -> Length

Source§

impl LengthExt for u32

Source§

fn px(self) -> Length

Source§

fn em(self) -> Length

Source§

fn rem(self) -> Length

Source§

fn pct(self) -> Length

Source§

fn vw(self) -> Length

Source§

fn vh(self) -> Length

Source§

fn vmin(self) -> Length

Source§

fn vmax(self) -> Length

Source§

fn fr(self) -> Length

Implementors§