pub struct BorderWidth {
    pub top: f32,
    pub right: f32,
    pub bottom: f32,
    pub left: f32,
}Expand description
The border width of a rounded rectangle.
Fields§
§top: f32The top border width.
right: f32The right border width.
bottom: f32The bottom border width.
left: f32The left border width.
Implementations§
Source§impl BorderWidth
 
impl BorderWidth
Sourcepub const ZERO: Self = _
 
pub const ZERO: Self = _
A BorderWidth with zero width on all borders.
Sourcepub const fn new(top: f32, right: f32, bottom: f32, left: f32) -> Self
 
pub const fn new(top: f32, right: f32, bottom: f32, left: f32) -> Self
Create a new BorderWidth.
Sourcepub const fn all(width: f32) -> Self
 
pub const fn all(width: f32) -> Self
Create a new BorderWidth with the same width on all borders.
Sourcepub fn max_element(&self) -> f32
 
pub fn max_element(&self) -> f32
Get the maximum width of the borders.
Sourcepub fn min_element(&self) -> f32
 
pub fn min_element(&self) -> f32
Get the minimum width of the borders.
Trait Implementations§
Source§impl Clone for BorderWidth
 
impl Clone for BorderWidth
Source§fn clone(&self) -> BorderWidth
 
fn clone(&self) -> BorderWidth
Returns a copy 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 BorderWidth
 
impl Debug for BorderWidth
Source§impl Default for BorderWidth
 
impl Default for BorderWidth
Source§fn default() -> BorderWidth
 
fn default() -> BorderWidth
Returns the “default value” for a type. Read more
Source§impl From<BorderWidth> for [f32; 4]
 
impl From<BorderWidth> for [f32; 4]
Source§fn from(width: BorderWidth) -> Self
 
fn from(width: BorderWidth) -> Self
Converts to this type from the input type.
Source§impl From<f32> for BorderWidth
 
impl From<f32> for BorderWidth
Source§impl PartialEq for BorderWidth
 
impl PartialEq for BorderWidth
impl Copy for BorderWidth
impl StructuralPartialEq for BorderWidth
Auto Trait Implementations§
impl Freeze for BorderWidth
impl RefUnwindSafe for BorderWidth
impl Send for BorderWidth
impl Sync for BorderWidth
impl Unpin for BorderWidth
impl UnwindSafe for BorderWidth
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