pub struct BorderInfo {
pub width: f32,
pub style: BorderStyle,
pub color: ColorU,
pub source: BorderSource,
}Expand description
Information about a border for conflict resolution
Fields§
§width: f32§style: BorderStyle§color: ColorU§source: BorderSourceImplementations§
Source§impl BorderInfo
impl BorderInfo
pub fn new( width: f32, style: BorderStyle, color: ColorU, source: BorderSource, ) -> Self
Sourcepub fn style_priority(style: &BorderStyle) -> u8
pub fn style_priority(style: &BorderStyle) -> u8
Get the priority of a border style for conflict resolution Higher number = higher priority
Sourcepub fn resolve_conflict(a: &BorderInfo, b: &BorderInfo) -> Option<BorderInfo>
pub fn resolve_conflict(a: &BorderInfo, b: &BorderInfo) -> Option<BorderInfo>
Compare two borders for conflict resolution per CSS 2.2 Section 17.6.2.1 Returns the winning border
Trait Implementations§
Source§impl Clone for BorderInfo
impl Clone for BorderInfo
Source§fn clone(&self) -> BorderInfo
fn clone(&self) -> BorderInfo
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 moreAuto Trait Implementations§
impl Freeze for BorderInfo
impl RefUnwindSafe for BorderInfo
impl Send for BorderInfo
impl Sync for BorderInfo
impl Unpin for BorderInfo
impl UnwindSafe for BorderInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more