Struct style::logical_geometry::LogicalRect
source · pub struct LogicalRect<T> {
pub start: LogicalPoint<T>,
pub size: LogicalSize<T>,
debug_writing_mode: DebugWritingMode,
}
Expand description
A rectangle in flow-relative dimensions
Fields§
§start: LogicalPoint<T>
§size: LogicalSize<T>
§debug_writing_mode: DebugWritingMode
Implementations§
source§impl<T: Zero> LogicalRect<T>
impl<T: Zero> LogicalRect<T>
pub fn zero(mode: WritingMode) -> LogicalRect<T>
source§impl<T: Copy> LogicalRect<T>
impl<T: Copy> LogicalRect<T>
pub fn new( mode: WritingMode, inline_start: T, block_start: T, inline: T, block: T, ) -> LogicalRect<T>
pub fn from_point_size( mode: WritingMode, start: LogicalPoint<T>, size: LogicalSize<T>, ) -> LogicalRect<T>
source§impl<T: Copy + Add<T, Output = T> + Sub<T, Output = T>> LogicalRect<T>
impl<T: Copy + Add<T, Output = T> + Sub<T, Output = T>> LogicalRect<T>
pub fn from_physical( mode: WritingMode, rect: Rect<T>, container_size: Size2D<T>, ) -> LogicalRect<T>
pub fn inline_end(&self) -> T
pub fn block_end(&self) -> T
pub fn to_physical( &self, mode: WritingMode, container_size: Size2D<T>, ) -> Rect<T>
pub fn convert( &self, mode_from: WritingMode, mode_to: WritingMode, container_size: Size2D<T>, ) -> LogicalRect<T>
pub fn translate_by_size(&self, offset: LogicalSize<T>) -> LogicalRect<T>
pub fn translate(&self, offset: &LogicalPoint<T>) -> LogicalRect<T>
source§impl<T: Copy + Ord + Add<T, Output = T> + Sub<T, Output = T>> LogicalRect<T>
impl<T: Copy + Ord + Add<T, Output = T> + Sub<T, Output = T>> LogicalRect<T>
pub fn union(&self, other: &LogicalRect<T>) -> LogicalRect<T>
Trait Implementations§
source§impl<T: Copy + Add<T, Output = T> + Sub<T, Output = T>> Add<LogicalMargin<T>> for LogicalRect<T>
impl<T: Copy + Add<T, Output = T> + Sub<T, Output = T>> Add<LogicalMargin<T>> for LogicalRect<T>
§type Output = LogicalRect<T>
type Output = LogicalRect<T>
The resulting type after applying the
+
operator.source§fn add(self, other: LogicalMargin<T>) -> LogicalRect<T>
fn add(self, other: LogicalMargin<T>) -> LogicalRect<T>
Performs the
+
operation. Read moresource§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<T: Debug> Debug for LogicalRect<T>
impl<T: Debug> Debug for LogicalRect<T>
source§impl<T: PartialEq> PartialEq for LogicalRect<T>
impl<T: PartialEq> PartialEq for LogicalRect<T>
source§fn eq(&self, other: &LogicalRect<T>) -> bool
fn eq(&self, other: &LogicalRect<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> Serialize for LogicalRect<T>where
T: Serialize,
impl<T> Serialize for LogicalRect<T>where
T: Serialize,
source§impl<T: Copy + Add<T, Output = T> + Sub<T, Output = T>> Sub<LogicalMargin<T>> for LogicalRect<T>
impl<T: Copy + Add<T, Output = T> + Sub<T, Output = T>> Sub<LogicalMargin<T>> for LogicalRect<T>
§type Output = LogicalRect<T>
type Output = LogicalRect<T>
The resulting type after applying the
-
operator.source§fn sub(self, other: LogicalMargin<T>) -> LogicalRect<T>
fn sub(self, other: LogicalMargin<T>) -> LogicalRect<T>
Performs the
-
operation. Read moreimpl<T: Copy> Copy for LogicalRect<T>
impl<T: Eq> Eq for LogicalRect<T>
impl<T> StructuralPartialEq 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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