pub enum Sizing<T> {
Fit {
min: T,
max: T,
},
Grow {
min: T,
max: T,
},
Fixed(T),
Percent(f32),
}Expand description
allocation requested from a parent layout on one axis
Variants§
Implementations§
Source§impl<T> Sizing<T>where
T: Scalar,
impl<T> Sizing<T>where
T: Scalar,
pub const fn fit() -> Sizing<T>
pub const fn fit_range(min: T, max: T) -> Sizing<T>
pub const fn grow() -> Sizing<T>
pub const fn grow_range(min: T, max: T) -> Sizing<T>
pub const fn fixed(size: T) -> Sizing<T>
pub const fn percent(fraction: f32) -> Sizing<T>
pub fn clamp(self, size: T) -> T
Trait Implementations§
impl<T> Copy for Sizing<T>where
T: Copy,
impl<T> StructuralPartialEq for Sizing<T>where
T: PartialEq,
Auto Trait Implementations§
impl<T> Forget for Sizing<T>
impl<T> Freeze for Sizing<T>where
T: Freeze,
impl<T> Move for Sizing<T>
impl<T> RefUnwindSafe for Sizing<T>where
T: RefUnwindSafe,
impl<T> Send for Sizing<T>where
T: Send,
impl<T> Sync for Sizing<T>where
T: Sync,
impl<T> Unpin for Sizing<T>where
T: Unpin,
impl<T> UnsafeUnpin for Sizing<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Sizing<T>where
T: UnwindSafe,
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