pub enum Length {
Px(f32),
Em(f32),
Rem(f32),
}Expand description
A length with its unit still attached, so that em and rem can be
resolved against the right font size later. Absolute units other than
px are converted to pixels when parsed.
Variants§
Px(f32)
Em(f32)
Relative to the element’s font size (the parent’s, for font-size
itself).
Rem(f32)
Relative to the root font size, see
Styler::set_root_font_size.
Implementations§
Trait Implementations§
impl Copy for Length
impl StructuralPartialEq for Length
Auto Trait Implementations§
impl Freeze for Length
impl RefUnwindSafe for Length
impl Send for Length
impl Sync for Length
impl Unpin for Length
impl UnsafeUnpin for Length
impl UnwindSafe for Length
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more