pub enum SizeValue {
Absolute(usize),
Percent(f64),
}Expand description
Value that can be absolute (number) or percentage (string like “50%”). For simplicity in Rust, we represent percentage as f64 (0.0..=100.0).
Variants§
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SizeValue
impl RefUnwindSafe for SizeValue
impl Send for SizeValue
impl Sync for SizeValue
impl Unpin for SizeValue
impl UnsafeUnpin for SizeValue
impl UnwindSafe for SizeValue
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