#[repr(C)]pub struct LayoutBorderSpacing {
pub horizontal: PixelValue,
pub vertical: PixelValue,
}Expand description
Sets the distance between the borders of adjacent cells.
The border-spacing property is only applicable when border-collapse is set to separate.
It can have one or two values:
- One value: Sets both horizontal and vertical spacing
- Two values: First is horizontal, second is vertical
This struct represents a single spacing value (either horizontal or vertical).
Fields§
§horizontal: PixelValueHorizontal spacing between cell borders
vertical: PixelValueVertical spacing between cell borders
Implementations§
Source§impl LayoutBorderSpacing
impl LayoutBorderSpacing
Sourcepub const fn new(spacing: PixelValue) -> Self
pub const fn new(spacing: PixelValue) -> Self
Creates a new border spacing with the same value for horizontal and vertical
Sourcepub const fn new_separate(horizontal: PixelValue, vertical: PixelValue) -> Self
pub const fn new_separate(horizontal: PixelValue, vertical: PixelValue) -> Self
Creates a new border spacing with different horizontal and vertical values
Trait Implementations§
Source§impl Clone for LayoutBorderSpacing
impl Clone for LayoutBorderSpacing
Source§fn clone(&self) -> LayoutBorderSpacing
fn clone(&self) -> LayoutBorderSpacing
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutBorderSpacing
impl Debug for LayoutBorderSpacing
Source§impl Default for LayoutBorderSpacing
impl Default for LayoutBorderSpacing
Source§impl FormatAsRustCode for LayoutBorderSpacing
impl FormatAsRustCode for LayoutBorderSpacing
fn format_as_rust_code(&self, _tabs: usize) -> String
Source§impl From<LayoutBorderSpacing> for CssProperty
impl From<LayoutBorderSpacing> for CssProperty
Source§fn from(e: LayoutBorderSpacing) -> Self
fn from(e: LayoutBorderSpacing) -> Self
Converts to this type from the input type.
Source§impl Hash for LayoutBorderSpacing
impl Hash for LayoutBorderSpacing
Source§impl Ord for LayoutBorderSpacing
impl Ord for LayoutBorderSpacing
Source§fn cmp(&self, other: &LayoutBorderSpacing) -> Ordering
fn cmp(&self, other: &LayoutBorderSpacing) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LayoutBorderSpacing
impl PartialEq for LayoutBorderSpacing
Source§impl PartialOrd for LayoutBorderSpacing
impl PartialOrd for LayoutBorderSpacing
Source§impl PrintAsCssValue for LayoutBorderSpacing
impl PrintAsCssValue for LayoutBorderSpacing
fn print_as_css_value(&self) -> String
impl Copy for LayoutBorderSpacing
impl Eq for LayoutBorderSpacing
impl StructuralPartialEq for LayoutBorderSpacing
Auto Trait Implementations§
impl Freeze for LayoutBorderSpacing
impl RefUnwindSafe for LayoutBorderSpacing
impl Send for LayoutBorderSpacing
impl Sync for LayoutBorderSpacing
impl Unpin for LayoutBorderSpacing
impl UnwindSafe for LayoutBorderSpacing
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