pub struct Padding {
pub left: u16,
pub right: u16,
pub top: u16,
pub bottom: u16,
}Expand description
Represents padding with values for left, right, top, and bottom.
Fields§
§left: u16Padding value for the left side.
right: u16Padding value for the right side.
top: u16Padding value for the top side.
bottom: u16Padding value for the bottom side.
Implementations§
Source§impl Padding
impl Padding
Sourcepub fn new_rect(left: u16, right: u16, top: u16, bottom: u16) -> Self
pub fn new_rect(left: u16, right: u16, top: u16, bottom: u16) -> Self
Creates a new Padding instance with specific values for all sides.
Sourcepub fn all(value: u16) -> Self
pub fn all(value: u16) -> Self
Creates a new Padding instance with the same value for all sides.
Sourcepub fn horizontal(value: u16) -> Self
pub fn horizontal(value: u16) -> Self
Creates a new Padding instance with the same value for left and right sides.
Trait Implementations§
Source§impl From<Clay_Padding> for Padding
impl From<Clay_Padding> for Padding
Source§fn from(value: Clay_Padding) -> Self
fn from(value: Clay_Padding) -> Self
Converts to this type from the input type.
Source§impl From<Padding> for Clay_Padding
impl From<Padding> for Clay_Padding
impl Copy for Padding
Auto Trait Implementations§
impl Freeze for Padding
impl RefUnwindSafe for Padding
impl Send for Padding
impl Sync for Padding
impl Unpin for Padding
impl UnwindSafe 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