pub struct BorderBoxRect(pub LogicalRect);Expand description
A rectangle in border-box coordinates (includes padding and border).
This is what layout calculates and stores in used_size and absolute positions.
Tuple Fields§
§0: LogicalRectImplementations§
Source§impl BorderBoxRect
impl BorderBoxRect
Sourcepub fn to_content_box(
self,
padding: &EdgeSizes,
border: &EdgeSizes,
) -> ContentBoxRect
pub fn to_content_box( self, padding: &EdgeSizes, border: &EdgeSizes, ) -> ContentBoxRect
Convert border-box to content-box by subtracting padding and border. Content-box is where inline layout and text actually render.
Sourcepub fn rect(&self) -> LogicalRect
pub fn rect(&self) -> LogicalRect
Get the inner LogicalRect
Trait Implementations§
Source§impl Clone for BorderBoxRect
impl Clone for BorderBoxRect
Source§fn clone(&self) -> BorderBoxRect
fn clone(&self) -> BorderBoxRect
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 BorderBoxRect
impl Debug for BorderBoxRect
Source§impl PartialEq for BorderBoxRect
impl PartialEq for BorderBoxRect
impl Copy for BorderBoxRect
impl StructuralPartialEq for BorderBoxRect
Auto Trait Implementations§
impl Freeze for BorderBoxRect
impl RefUnwindSafe for BorderBoxRect
impl Send for BorderBoxRect
impl Sync for BorderBoxRect
impl Unpin for BorderBoxRect
impl UnwindSafe for BorderBoxRect
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