pub struct LayoutRecord {
pub widget_name: String,
pub area_requested: Rect,
pub area_received: Rect,
pub constraints: LayoutConstraints,
pub children: Vec<LayoutRecord>,
}Expand description
Layout record for a single widget.
Fields§
§widget_name: StringName of the widget this record describes.
area_requested: RectArea originally requested by the widget.
area_received: RectArea actually received after layout.
constraints: LayoutConstraintsConstraint bounds applied during layout.
children: Vec<LayoutRecord>Child layout records for nested widgets.
Implementations§
Source§impl LayoutRecord
impl LayoutRecord
Sourcepub fn new(
name: impl Into<String>,
area_requested: Rect,
area_received: Rect,
constraints: LayoutConstraints,
) -> Self
pub fn new( name: impl Into<String>, area_requested: Rect, area_received: Rect, constraints: LayoutConstraints, ) -> Self
Create a new layout record for the given widget.
Sourcepub fn with_child(self, child: LayoutRecord) -> Self
pub fn with_child(self, child: LayoutRecord) -> Self
Add a child record to this layout record.
Trait Implementations§
Source§impl Clone for LayoutRecord
impl Clone for LayoutRecord
Source§fn clone(&self) -> LayoutRecord
fn clone(&self) -> LayoutRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LayoutRecord
impl RefUnwindSafe for LayoutRecord
impl Send for LayoutRecord
impl Sync for LayoutRecord
impl Unpin for LayoutRecord
impl UnwindSafe for LayoutRecord
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