pub struct Layout<'a> { /* private fields */ }Expand description
The bounds of a Node and its children, using absolute coordinates.
Implementations§
Source§impl<'a> Layout<'a>
impl<'a> Layout<'a>
Sourcepub fn with_offset(offset: Vector, node: &'a Node) -> Self
pub fn with_offset(offset: Vector, node: &'a Node) -> Self
Sourcepub fn move_to(self, position: impl Into<Point>) -> Self
pub fn move_to(self, position: impl Into<Point>) -> Self
Moves the Layout to the given position.
Sourcepub fn parent(&self) -> Option<Rectangle>
pub fn parent(&self) -> Option<Rectangle>
Returns the bounds of the parent of this Layout, if any.
Sourcepub fn children(
self,
) -> impl DoubleEndedIterator<Item = Layout<'a>> + ExactSizeIterator
pub fn children( self, ) -> impl DoubleEndedIterator<Item = Layout<'a>> + ExactSizeIterator
Returns an iterator over the children of this Layout.
Trait Implementations§
impl<'a> Copy for Layout<'a>
Auto Trait Implementations§
impl<'a> Freeze for Layout<'a>
impl<'a> RefUnwindSafe for Layout<'a>
impl<'a> Send for Layout<'a>
impl<'a> Sync for Layout<'a>
impl<'a> Unpin for Layout<'a>
impl<'a> UnsafeUnpin for Layout<'a>
impl<'a> UnwindSafe for Layout<'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