pub struct SingleChild { /* private fields */ }Implementations§
Source§impl SingleChild
impl SingleChild
pub fn new<W>(child: W) -> Selfwhere
W: Widget + 'static,
Sourcepub fn new_with_paint_boundary<W>(child: W) -> Selfwhere
W: Widget + 'static,
pub fn new_with_paint_boundary<W>(child: W) -> Selfwhere
W: Widget + 'static,
Creates a child whose scene is retained behind an explicit paint boundary.
This is useful for containers that move their complete child subtree as a unit. The child’s own composition mode and layer properties are preserved; only a flat paint boundary is promoted to an explicit one.
Sourcepub fn with_paint_boundary(self) -> Self
pub fn with_paint_boundary(self) -> Self
Returns this child wrapper with an explicit paint boundary forced on. The consuming form keeps layer-topology changes in builder flows.
pub fn from_pod(child: WidgetPod) -> Self
pub fn child(&self) -> &WidgetPod
pub fn child_mut(&mut self) -> &mut WidgetPod
pub fn measure( &mut self, ctx: &mut MeasureCtx, constraints: Constraints, ) -> Size
pub fn measure_size( &mut self, ctx: &mut MeasureCtx, constraints: Constraints, ) -> Size
pub fn measure_axis( &mut self, ctx: &mut MeasureCtx, constraints: Constraints, axis: Axis, ) -> f32
pub fn arrange(&mut self, ctx: &mut ArrangeCtx, bounds: Rect)
pub fn arrange_transformed( &mut self, ctx: &mut ArrangeCtx, bounds: Rect, transform: Transform, )
pub fn set_bounds(&mut self, bounds: Rect)
pub fn paint(&self, ctx: &mut PaintCtx)
pub fn semantics(&self, ctx: &mut SemanticsCtx)
pub fn visit_children(&self, visitor: &mut dyn WidgetPodVisitor)
pub fn visit_children_mut(&mut self, visitor: &mut dyn WidgetPodMutVisitor)
Auto Trait Implementations§
impl !Freeze for SingleChild
impl !RefUnwindSafe for SingleChild
impl !Send for SingleChild
impl !Sync for SingleChild
impl !UnwindSafe for SingleChild
impl Unpin for SingleChild
impl UnsafeUnpin for SingleChild
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