pub enum Size {
Auto,
LengthPercentage(LengthPercentage),
MaxContent,
MinContent,
FitContent(FitContent),
None,
}Expand description
Value for width, height, min-width, min-height,
max-width, max-height.
Variants§
Auto
auto — let the layout algorithm choose.
LengthPercentage(LengthPercentage)
An explicit length or percentage.
MaxContent
max-content — the maximum intrinsic content size.
MinContent
min-content — the minimum intrinsic content size.
FitContent(FitContent)
fit-content (or fit-content(<limit>)).
None
none — only valid for max-* properties.
Trait Implementations§
Source§impl From<FitContent> for Size
impl From<FitContent> for Size
Source§fn from(fc: FitContent) -> Self
fn from(fc: FitContent) -> Self
Converts to this type from the input type.
Source§impl From<LengthPercentage> for Size
impl From<LengthPercentage> for Size
Source§fn from(lp: LengthPercentage) -> Self
fn from(lp: LengthPercentage) -> Self
Converts to this type from the input type.
Source§impl From<MaxContent> for Size
impl From<MaxContent> for Size
Source§fn from(_: MaxContent) -> Self
fn from(_: MaxContent) -> Self
Converts to this type from the input type.
Source§impl From<Percentage> for Size
impl From<Percentage> for Size
Source§fn from(p: Percentage) -> Self
fn from(p: Percentage) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Size
Auto Trait Implementations§
impl Freeze for Size
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnsafeUnpin for Size
impl UnwindSafe for Size
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