pub struct EdgeSizes {
pub top: f32,
pub right: f32,
pub bottom: f32,
pub left: f32,
}Expand description
Represents the four edges of a box for properties like margin, padding, border.
Fields§
§top: f32§right: f32§bottom: f32§left: f32Implementations§
Source§impl EdgeSizes
impl EdgeSizes
Sourcepub fn main_start(&self, wm: LayoutWritingMode) -> f32
pub fn main_start(&self, wm: LayoutWritingMode) -> f32
Returns the size of the edge at the start of the main/block axis.
Sourcepub fn main_end(&self, wm: LayoutWritingMode) -> f32
pub fn main_end(&self, wm: LayoutWritingMode) -> f32
Returns the size of the edge at the end of the main/block axis.
Sourcepub fn main_sum(&self, wm: LayoutWritingMode) -> f32
pub fn main_sum(&self, wm: LayoutWritingMode) -> f32
Returns the sum of the start and end sizes on the main/block axis.
Sourcepub fn cross_start(&self, wm: LayoutWritingMode) -> f32
pub fn cross_start(&self, wm: LayoutWritingMode) -> f32
Returns the size of the edge at the start of the cross/inline axis.
Sourcepub fn cross_end(&self, wm: LayoutWritingMode) -> f32
pub fn cross_end(&self, wm: LayoutWritingMode) -> f32
Returns the size of the edge at the end of the cross/inline axis.
Sourcepub fn cross_sum(&self, wm: LayoutWritingMode) -> f32
pub fn cross_sum(&self, wm: LayoutWritingMode) -> f32
Returns the sum of the start and end sizes on the cross/inline axis.
Trait Implementations§
impl Copy for EdgeSizes
Auto Trait Implementations§
impl Freeze for EdgeSizes
impl RefUnwindSafe for EdgeSizes
impl Send for EdgeSizes
impl Sync for EdgeSizes
impl Unpin for EdgeSizes
impl UnwindSafe for EdgeSizes
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