pub struct ResolvedBoxProps {
pub margin: EdgeSizes,
pub padding: EdgeSizes,
pub border: EdgeSizes,
pub margin_auto: MarginAuto,
}Expand description
A fully resolved representation of a node’s box model properties.
All values are in pixels. This is the result of resolving UnresolvedBoxProps
against a containing block.
Fields§
§margin: EdgeSizes§padding: EdgeSizes§border: EdgeSizes§margin_auto: MarginAutoTracks which margins are set to auto.
CSS 2.2 § 10.3.3: If both margin-left and margin-right are auto,
their used values are equal, centering the element within its container.
Implementations§
Source§impl ResolvedBoxProps
impl ResolvedBoxProps
Sourcepub fn inner_size(
&self,
outer_size: LogicalSize,
wm: LayoutWritingMode,
) -> LogicalSize
pub fn inner_size( &self, outer_size: LogicalSize, wm: LayoutWritingMode, ) -> LogicalSize
Calculates the inner content-box size from an outer border-box size, correctly accounting for the specified writing mode.
Trait Implementations§
Source§impl Clone for ResolvedBoxProps
impl Clone for ResolvedBoxProps
Source§fn clone(&self) -> ResolvedBoxProps
fn clone(&self) -> ResolvedBoxProps
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 moreSource§impl Debug for ResolvedBoxProps
impl Debug for ResolvedBoxProps
Source§impl Default for ResolvedBoxProps
impl Default for ResolvedBoxProps
Source§fn default() -> ResolvedBoxProps
fn default() -> ResolvedBoxProps
Returns the “default value” for a type. Read more
impl Copy for ResolvedBoxProps
Auto Trait Implementations§
impl Freeze for ResolvedBoxProps
impl RefUnwindSafe for ResolvedBoxProps
impl Send for ResolvedBoxProps
impl Sync for ResolvedBoxProps
impl Unpin for ResolvedBoxProps
impl UnsafeUnpin for ResolvedBoxProps
impl UnwindSafe for ResolvedBoxProps
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