Enum leftwm_core::models::Size [−][src]
Expand description
Helper enum to represent a size which can be an absolute pixel value or a relative percentage value
Variants
Pixel(i32)Tuple Fields of Pixel
0: i32Percentage(f32)Tuple Fields of Percentage
0: f32Implementations
Turn the size into an absolute value, the pixel value
will be returned as is, the percentage value will be
multiplied by the provided whole to calculate
the absolute value
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Size
impl UnwindSafe for Size
Blanket Implementations
Mutably borrows from an owned value. Read more