pub struct BoxModel {
pub content: ElementQuad,
pub padding: ElementQuad,
pub border: ElementQuad,
pub margin: ElementQuad,
pub width: u32,
pub height: u32,
}Fields§
§content: ElementQuadContent area quad.
padding: ElementQuadPadding area quad.
border: ElementQuadBorder area quad.
margin: ElementQuadMargin area quad.
width: u32Width of the element.
height: u32Height of the element.
Implementations§
Source§impl BoxModel
impl BoxModel
Sourcepub fn content_viewport(&self) -> Viewport
pub fn content_viewport(&self) -> Viewport
Create a Viewport equal to the content-box, using a scale of 1.0
Sourcepub fn padding_viewport(&self) -> Viewport
pub fn padding_viewport(&self) -> Viewport
Create a Viewport equal to the padding-box, using a scale of 1.0
Sourcepub fn border_viewport(&self) -> Viewport
pub fn border_viewport(&self) -> Viewport
Create a Viewport equal to the border-box, using a scale of 1.0
Sourcepub fn margin_viewport(&self) -> Viewport
pub fn margin_viewport(&self) -> Viewport
Create a Viewport equal to the margin-box, using a scale of 1.0
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BoxModel
impl RefUnwindSafe for BoxModel
impl Send for BoxModel
impl Sync for BoxModel
impl Unpin for BoxModel
impl UnwindSafe for BoxModel
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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