pub struct Padding<W> { /* private fields */ }Expand description
A widget wrapper that applies padding around an inner widget.
Implementations§
Source§impl<W> Padding<W>
impl<W> Padding<W>
Sourcepub const fn padding_sides(&self) -> Sides
pub const fn padding_sides(&self) -> Sides
Get the configured padding.
Sourcepub fn inner_area(&self, area: Rect) -> Rect
pub fn inner_area(&self, area: Rect) -> Rect
Compute the inner rect for a given outer area.
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consume and return the inner widget.
Trait Implementations§
Source§impl<W: StatefulWidget> StatefulWidget for Padding<W>
impl<W: StatefulWidget> StatefulWidget for Padding<W>
Auto Trait Implementations§
impl<W> Freeze for Padding<W>where
W: Freeze,
impl<W> RefUnwindSafe for Padding<W>where
W: RefUnwindSafe,
impl<W> Send for Padding<W>where
W: Send,
impl<W> Sync for Padding<W>where
W: Sync,
impl<W> Unpin for Padding<W>where
W: Unpin,
impl<W> UnwindSafe for Padding<W>where
W: UnwindSafe,
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