pub struct NormalBorder {
pub left: BorderSide,
pub right: BorderSide,
pub top: BorderSide,
pub bottom: BorderSide,
pub radius: BorderRadius,
pub do_aa: bool,
}
Fields§
§left: BorderSide
§right: BorderSide
§top: BorderSide
§bottom: BorderSide
§radius: BorderRadius
§do_aa: bool
Whether to apply anti-aliasing on the border corners.
Note that for this to be false
and work, this requires the borders to
be solid, and no border-radius.
Implementations§
Source§impl NormalBorder
impl NormalBorder
Sourcepub fn normalize(&mut self, widths: &LayoutSideOffsets)
pub fn normalize(&mut self, widths: &LayoutSideOffsets)
Normalizes a border so that we don’t render disallowed stuff, like inset borders that are less than two pixels wide.
Trait Implementations§
Source§impl Clone for NormalBorder
impl Clone for NormalBorder
Source§fn clone(&self) -> NormalBorder
fn clone(&self) -> NormalBorder
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 NormalBorder
impl Debug for NormalBorder
Source§impl Default for NormalBorder
impl Default for NormalBorder
Source§fn default() -> NormalBorder
fn default() -> NormalBorder
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NormalBorder
impl<'de> Deserialize<'de> for NormalBorder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MallocSizeOf for NormalBorder
impl MallocSizeOf for NormalBorder
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl PartialEq for NormalBorder
impl PartialEq for NormalBorder
Source§impl Peek for NormalBorder
impl Peek for NormalBorder
Source§impl Poke for NormalBorder
impl Poke for NormalBorder
Source§impl Serialize for NormalBorder
impl Serialize for NormalBorder
impl Copy for NormalBorder
impl StructuralPartialEq for NormalBorder
Auto Trait Implementations§
impl Freeze for NormalBorder
impl RefUnwindSafe for NormalBorder
impl Send for NormalBorder
impl Sync for NormalBorder
impl Unpin for NormalBorder
impl UnwindSafe for NormalBorder
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