pub struct ChildLayout<'a> { /* private fields */ }Expand description
What a CustomMultiChildLayout’s function is handed: its children, by key, to measure
and to place.
Implementations§
Source§impl<'a> ChildLayout<'a>
impl<'a> ChildLayout<'a>
Sourcepub fn has_child(&self, key: impl Hash) -> bool
pub fn has_child(&self, key: impl Hash) -> bool
Whether a child was given under key: a layout whose children come and go asks
before it measures.
Sourcepub fn layout_child(
&mut self,
key: impl Hash,
constraints: ChildConstraints,
) -> Size
pub fn layout_child( &mut self, key: impl Hash, constraints: ChildConstraints, ) -> Size
Lays the child named key out under constraints and says how big it came out. A
child never laid out is not shown; one laid out twice keeps the second answer.
§Panics
If no child was given under key, as the reference’s does: the layout is asking
about something that is not there, and a size made up for it would be placed.
Sourcepub fn position_child(&mut self, key: impl Hash, at: Point)
pub fn position_child(&mut self, key: impl Hash, at: Point)
Puts the child named key with its top left corner at at, from the layout’s own
top left. A child laid out and never placed is at the corner.
§Panics
If no child was given under key.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ChildLayout<'a>
impl<'a> !Send for ChildLayout<'a>
impl<'a> !Sync for ChildLayout<'a>
impl<'a> !UnwindSafe for ChildLayout<'a>
impl<'a> Freeze for ChildLayout<'a>
impl<'a> Unpin for ChildLayout<'a>
impl<'a> UnsafeUnpin for ChildLayout<'a>
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