pub struct Margin {
pub top: u32,
pub right: u32,
pub bottom: u32,
pub left: u32,
}Expand description
Margin outside a container.
Adds space around the outside of a container’s border. All values are in terminal columns/rows.
Fields§
§top: u32Margin on the top edge.
right: u32Margin on the right edge.
bottom: u32Margin on the bottom edge.
left: u32Margin on the left edge.
Implementations§
Source§impl Margin
impl Margin
Sourcepub const fn xy(x: u32, y: u32) -> Self
pub const fn xy(x: u32, y: u32) -> Self
Create margin with x on left/right and y on top/bottom.
Sourcepub const fn new(top: u32, right: u32, bottom: u32, left: u32) -> Self
pub const fn new(top: u32, right: u32, bottom: u32, left: u32) -> Self
Create margin with explicit values for each side.
Sourcepub const fn horizontal(self) -> u32
pub const fn horizontal(self) -> u32
Total horizontal margin (left + right).
Trait Implementations§
impl Copy for Margin
impl Eq for Margin
impl StructuralPartialEq for Margin
Auto Trait Implementations§
impl Freeze for Margin
impl RefUnwindSafe for Margin
impl Send for Margin
impl Sync for Margin
impl Unpin for Margin
impl UnsafeUnpin for Margin
impl UnwindSafe for Margin
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