Struct layout_2020::geom::LogicalRect
source · pub struct LogicalRect<T> {
pub start_corner: LogicalVec2<T>,
pub size: LogicalVec2<T>,
}
Fields§
§start_corner: LogicalVec2<T>
§size: LogicalVec2<T>
Implementations§
source§impl<T> LogicalRect<T>
impl<T> LogicalRect<T>
pub fn max_inline_position(&self) -> T
pub fn max_block_position(&self) -> T
pub fn inflate(&self, sides: &LogicalSides<T>) -> Self
pub fn deflate(&self, sides: &LogicalSides<T>) -> Self
source§impl LogicalRect<Au>
impl LogicalRect<Au>
pub fn to_physical( &self, containing_block: Option<&ContainingBlock<'_>>, ) -> PhysicalRect<Au>
source§impl LogicalRect<Au>
impl LogicalRect<Au>
fn get_axis(&self, axis: AxisDirection) -> RectAxis
Trait Implementations§
source§impl<T: Clone> Clone for LogicalRect<T>
impl<T: Clone> Clone for LogicalRect<T>
source§fn clone(&self) -> LogicalRect<T>
fn clone(&self) -> LogicalRect<T>
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 LogicalRect<Au>
impl Debug for LogicalRect<Au>
source§impl From<LogicalRect<Au>> for LogicalRect<CSSPixelLength>
impl From<LogicalRect<Au>> for LogicalRect<CSSPixelLength>
source§fn from(value: LogicalRect<Au>) -> Self
fn from(value: LogicalRect<Au>) -> Self
Converts to this type from the input type.
source§impl From<LogicalRect<CSSPixelLength>> for LogicalRect<Au>
impl From<LogicalRect<CSSPixelLength>> for LogicalRect<Au>
source§fn from(value: LogicalRect<CSSPixelLength>) -> Self
fn from(value: LogicalRect<CSSPixelLength>) -> Self
Converts to this type from the input type.
source§impl<T> Serialize for LogicalRect<T>where
T: Serialize,
impl<T> Serialize for LogicalRect<T>where
T: Serialize,
source§impl ToLogicalWithContainingBlock<LogicalRect<Au>> for PhysicalRect<Au>
impl ToLogicalWithContainingBlock<LogicalRect<Au>> for PhysicalRect<Au>
fn to_logical(&self, containing_block: &ContainingBlock<'_>) -> LogicalRect<Au>
impl<T: Copy> Copy for LogicalRect<T>
Auto Trait Implementations§
impl<T> Freeze for LogicalRect<T>where
T: Freeze,
impl<T> RefUnwindSafe for LogicalRect<T>where
T: RefUnwindSafe,
impl<T> Send for LogicalRect<T>where
T: Send,
impl<T> Sync for LogicalRect<T>where
T: Sync,
impl<T> Unpin for LogicalRect<T>where
T: Unpin,
impl<T> UnwindSafe for LogicalRect<T>where
T: UnwindSafe,
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> 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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert