taffy::style_helpers

Trait FromLength

Source
pub trait FromLength {
    // Required method
    fn from_length<Input: Into<f32> + Copy>(value: Input) -> Self;
}
Expand description

Trait to create absolute length values from plain numbers

Required Methods§

Source

fn from_length<Input: Into<f32> + Copy>(value: Input) -> Self

Converts into an Into<f32> into Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromLength for Option<f32>

Source§

fn from_length<Input: Into<f32> + Copy>(value: Input) -> Self

Source§

impl FromLength for f32

Source§

fn from_length<Input: Into<f32> + Copy>(value: Input) -> Self

Implementors§