pub struct Sides {
pub top: u16,
pub right: u16,
pub bottom: u16,
pub left: u16,
}Expand description
Sides for padding/margin.
Fields§
§top: u16Top padding/margin in cells.
right: u16Right padding/margin in cells.
bottom: u16Bottom padding/margin in cells.
left: u16Left padding/margin in cells.
Implementations§
Source§impl Sides
impl Sides
Sourcepub const fn horizontal(val: u16) -> Self
pub const fn horizontal(val: u16) -> Self
Create new sides with horizontal values only.
Sourcepub const fn new(top: u16, right: u16, bottom: u16, left: u16) -> Self
pub const fn new(top: u16, right: u16, bottom: u16, left: u16) -> Self
Create new sides with specific values.
Sourcepub const fn horizontal_sum(&self) -> u16
pub const fn horizontal_sum(&self) -> u16
Sum of left and right.
Sourcepub const fn vertical_sum(&self) -> u16
pub const fn vertical_sum(&self) -> u16
Sum of top and bottom.
Trait Implementations§
impl Copy for Sides
impl Eq for Sides
impl StructuralPartialEq for Sides
Auto Trait Implementations§
impl Freeze for Sides
impl RefUnwindSafe for Sides
impl Send for Sides
impl Sync for Sides
impl Unpin for Sides
impl UnwindSafe for Sides
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