pub struct Padding { /* private fields */ }Expand description
View wrapper that applies PaddingLayout to a single child.
Implementations§
Source§impl Padding
impl Padding
Sourcepub fn new(
edges: impl IntoComputed<EdgeInsets>,
content: impl View + 'static,
) -> Self
pub fn new( edges: impl IntoComputed<EdgeInsets>, content: impl View + 'static, ) -> Self
Wraps a view with custom edges.
Sourcepub fn into_inner(self) -> (Computed<EdgeInsets>, AnyView)
pub fn into_inner(self) -> (Computed<EdgeInsets>, AnyView)
Consumes the padding and returns the edge insets and content.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Padding
impl !Send for Padding
impl !Sync for Padding
impl !UnwindSafe for Padding
impl Freeze for Padding
impl Unpin for Padding
impl UnsafeUnpin for Padding
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
Source§impl<T> IdentifiableExt for T
impl<T> IdentifiableExt for T
Source§impl<V> PositionExt for Vwhere
V: View,
impl<V> PositionExt for Vwhere
V: View,
Source§fn position(
self,
x: impl IntoSignalF32,
y: impl IntoSignalF32,
) -> PositionedChild<Self>
fn position( self, x: impl IntoSignalF32, y: impl IntoSignalF32, ) -> PositionedChild<Self>
Position view’s center at absolute (x, y) coordinates. Read more
Source§fn position_anchor(
self,
anchor: UnitPoint,
x: impl IntoSignalF32,
y: impl IntoSignalF32,
) -> PositionedChild<Self>
fn position_anchor( self, anchor: UnitPoint, x: impl IntoSignalF32, y: impl IntoSignalF32, ) -> PositionedChild<Self>
Position view’s anchor point at absolute coordinates. Read more
Source§fn position_in(self, position: UnitPoint) -> PositionedChild<Self>
fn position_in(self, position: UnitPoint) -> PositionedChild<Self>
Position view’s center at fractional location in parent. Read more
Source§fn position_in_anchor(
self,
anchor: UnitPoint,
position: UnitPoint,
) -> PositionedChild<Self>
fn position_in_anchor( self, anchor: UnitPoint, position: UnitPoint, ) -> PositionedChild<Self>
Position view’s anchor at fractional location in parent. Read more
Source§fn position_in_offset(
self,
anchor: UnitPoint,
position: UnitPoint,
offset_x: impl IntoSignalF32,
offset_y: impl IntoSignalF32,
) -> PositionedChild<Self>
fn position_in_offset( self, anchor: UnitPoint, position: UnitPoint, offset_x: impl IntoSignalF32, offset_y: impl IntoSignalF32, ) -> PositionedChild<Self>
Position with fractional location plus offset. Read more
Source§fn pin(self, constraints: PinConstraints) -> PositionedChild<Self>
fn pin(self, constraints: PinConstraints) -> PositionedChild<Self>
Position using edge pins and optional explicit size. Read more