pub enum Bound {
Px(f32),
Fit,
Calc(Calc),
}Expand description
What a min_width / max_width / min_height / max_height
declares: px, the node’s own fit size (a min only), or a size
expression that layout resolves against the parent’s content box when
it sizes the node. Until then a calc bound clamps like none, as a
percentage clamp does in CSS’s intrinsic sizing.
A calc clamp rides in the clamp’s own f32 as a negative, the way
Min::FIT does (min_w below -1, Min::calc; max_w below 0,
max_calc), and layout writes the resolved px over it. A reader
after layout reads a number; one before it goes through
LayoutSpec::max_w_px.
Variants§
Trait Implementations§
impl Copy for Bound
impl StructuralPartialEq for Bound
Auto Trait Implementations§
impl Freeze for Bound
impl RefUnwindSafe for Bound
impl Send for Bound
impl Sync for Bound
impl Unpin for Bound
impl UnsafeUnpin for Bound
impl UnwindSafe for Bound
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