pub struct Flex {
pub orientation: Orientation,
pub spacing: f32,
}Expand description
Flex - a container that distributes space among its children flexibly
Fields§
§orientation: Orientation§spacing: f32Implementations§
Trait Implementations§
Source§impl LayoutView for Flex
impl LayoutView for Flex
Source§fn size_that_fits(
&self,
proposal: SizeProposal,
_subviews: &[&dyn LayoutView],
_cache: &mut LayoutCache,
) -> Size
fn size_that_fits( &self, proposal: SizeProposal, _subviews: &[&dyn LayoutView], _cache: &mut LayoutCache, ) -> Size
Propose a size for this view given the available space
Source§fn place_subviews(
&self,
bounds: Rect,
subviews: &mut [&mut dyn LayoutView],
cache: &mut LayoutCache,
)
fn place_subviews( &self, bounds: Rect, subviews: &mut [&mut dyn LayoutView], cache: &mut LayoutCache, )
Place subviews within the given bounds
Source§fn flex_weight(&self) -> f32
fn flex_weight(&self) -> f32
Returns the flex weight of this view (default is 0.0, which means fixed/intrinsic)
Source§fn debug_layout(&self, indent: usize) -> String
fn debug_layout(&self, indent: usize) -> String
Return a debug representation of this layout subtree.
The
indent parameter controls the indentation level for nested display.Auto Trait Implementations§
impl Freeze for Flex
impl RefUnwindSafe for Flex
impl Send for Flex
impl Sync for Flex
impl Unpin for Flex
impl UnsafeUnpin for Flex
impl UnwindSafe for Flex
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