pub struct Border {
pub top: BorderSide,
pub right: BorderSide,
pub bottom: BorderSide,
pub left: BorderSide,
}Expand description
A box’s border, side by side — the reference’s Border (box_border.dart:431):
each of the four sides its own colour and width.
Fields§
§top: BorderSideThe top side.
right: BorderSideThe right side.
bottom: BorderSideThe bottom side.
left: BorderSideThe left side.
Implementations§
Source§impl Border
impl Border
Sourcepub const fn new(width: f32, color: Color) -> Self
pub const fn new(width: f32, color: Color) -> Self
The same width and colour on all four sides.
Sourcepub const fn all(side: BorderSide) -> Self
pub const fn all(side: BorderSide) -> Self
side on all four sides — the reference’s Border.all and fromBorderSide.
Sourcepub const fn symmetric(vertical: BorderSide, horizontal: BorderSide) -> Self
pub const fn symmetric(vertical: BorderSide, horizontal: BorderSide) -> Self
vertical on the left and the right, horizontal on the top and the bottom — the
reference’s Border.symmetric.
Sourcepub fn is_uniform(&self) -> bool
pub fn is_uniform(&self) -> bool
Whether the four sides are the same.
Sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
true when some side is visible — non-zero width and non-zero alpha.
Sourcepub fn dimensions(&self) -> Insets
pub fn dimensions(&self) -> Insets
The room the border takes inside the box, side by side.
Trait Implementations§
impl Copy for Border
impl StructuralPartialEq for Border
Auto Trait Implementations§
impl Freeze for Border
impl RefUnwindSafe for Border
impl Send for Border
impl Sync for Border
impl Unpin for Border
impl UnsafeUnpin for Border
impl UnwindSafe for Border
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