pub struct Insets {
pub top: f32,
pub right: f32,
pub bottom: f32,
pub left: f32,
}Expand description
Per-side insets (padding or margin) in logical pixels.
Fields§
§top: f32Top inset.
right: f32Right inset.
bottom: f32Bottom inset.
left: f32Left inset.
Implementations§
Source§impl Insets
impl Insets
Sourcepub const fn new(top: f32, right: f32, bottom: f32, left: f32) -> Self
pub const fn new(top: f32, right: f32, bottom: f32, left: f32) -> Self
Construct per-side insets.
Sourcepub const fn symmetric(vertical: f32, horizontal: f32) -> Self
pub const fn symmetric(vertical: f32, horizontal: f32) -> Self
Symmetric insets: vertical on top/bottom, horizontal on left/right.
Sourcepub fn horizontal(self) -> f32
pub fn horizontal(self) -> f32
Total horizontal inset (left + right).
Trait Implementations§
impl Copy for Insets
impl StructuralPartialEq for Insets
Auto Trait Implementations§
impl Freeze for Insets
impl RefUnwindSafe for Insets
impl Send for Insets
impl Sync for Insets
impl Unpin for Insets
impl UnsafeUnpin for Insets
impl UnwindSafe for Insets
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