Struct layout_2020::geom::LogicalVec2
source · pub struct LogicalVec2<T> {
pub inline: T,
pub block: T,
}
Fields§
§inline: T
§block: T
Implementations§
source§impl<T> LogicalVec2<T>
impl<T> LogicalVec2<T>
pub fn map_inline_and_block_axes<U>( &self, inline_f: impl FnOnce(&T) -> U, block_f: impl FnOnce(&T) -> U, ) -> LogicalVec2<U>
source§impl<T: Clone> LogicalVec2<Size<T>>
impl<T: Clone> LogicalVec2<Size<T>>
pub fn map_inline_and_block_sizes<U>( &self, inline_f: impl FnOnce(T) -> U, block_f: impl FnOnce(T) -> U, ) -> LogicalVec2<Size<U>>
source§impl<T: Clone> LogicalVec2<T>
impl<T: Clone> LogicalVec2<T>
pub fn from_physical_size( physical_size: &PhysicalSize<T>, mode: WritingMode, ) -> Self
pub fn map<U>(&self, f: impl Fn(&T) -> U) -> LogicalVec2<U>
source§impl<T: Clone> LogicalVec2<GenericLengthPercentageOrAuto<T>>
impl<T: Clone> LogicalVec2<GenericLengthPercentageOrAuto<T>>
pub fn auto_is(&self, f: impl Fn() -> T) -> LogicalVec2<T>
source§impl<T: Clone> LogicalVec2<T>
impl<T: Clone> LogicalVec2<T>
pub fn to_physical_size(&self, mode: WritingMode) -> PhysicalSize<T>
source§impl<T: Copy + Neg<Output = T>> LogicalVec2<T>
impl<T: Copy + Neg<Output = T>> LogicalVec2<T>
pub fn to_physical_vector(&self, mode: WritingMode) -> PhysicalVec<T>
source§impl LogicalVec2<Au>
impl LogicalVec2<Au>
pub fn to_physical_point( &self, containing_block: Option<&ContainingBlock<'_>>, ) -> PhysicalPoint<Au>
source§impl LogicalVec2<Size<LengthPercentage>>
impl LogicalVec2<Size<LengthPercentage>>
pub(crate) fn percentages_relative_to( &self, containing_block: &ContainingBlock<'_>, ) -> LogicalVec2<Size<Au>>
pub(crate) fn maybe_percentages_relative_to_basis( &self, basis: &LogicalVec2<Option<Au>>, ) -> LogicalVec2<Size<Au>>
pub(crate) fn percentages_relative_to_basis( &self, basis: &LogicalVec2<Au>, ) -> LogicalVec2<Size<Au>>
Trait Implementations§
source§impl<T: AddAssign<T> + Copy> AddAssign for LogicalVec2<T>
impl<T: AddAssign<T> + Copy> AddAssign for LogicalVec2<T>
source§fn add_assign(&mut self, other: LogicalVec2<T>)
fn add_assign(&mut self, other: LogicalVec2<T>)
Performs the
+=
operation. Read moresource§impl<T: Clone> Clone for LogicalVec2<T>
impl<T: Clone> Clone for LogicalVec2<T>
source§fn clone(&self) -> LogicalVec2<T>
fn clone(&self) -> LogicalVec2<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 LogicalVec2<T>
impl<T: Debug> Debug for LogicalVec2<T>
source§impl<T: Default> Default for LogicalVec2<T>
impl<T: Default> Default for LogicalVec2<T>
source§impl From<LogicalVec2<Au>> for LogicalVec2<CSSPixelLength>
impl From<LogicalVec2<Au>> for LogicalVec2<CSSPixelLength>
source§fn from(value: LogicalVec2<Au>) -> Self
fn from(value: LogicalVec2<Au>) -> Self
Converts to this type from the input type.
source§impl From<LogicalVec2<CSSPixelLength>> for LogicalVec2<Au>
impl From<LogicalVec2<CSSPixelLength>> for LogicalVec2<Au>
source§fn from(value: LogicalVec2<CSSPixelLength>) -> Self
fn from(value: LogicalVec2<CSSPixelLength>) -> Self
Converts to this type from the input type.
source§impl<T: PartialEq> PartialEq for LogicalVec2<T>
impl<T: PartialEq> PartialEq for LogicalVec2<T>
source§fn eq(&self, other: &LogicalVec2<T>) -> bool
fn eq(&self, other: &LogicalVec2<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> Serialize for LogicalVec2<T>where
T: Serialize,
impl<T> Serialize for LogicalVec2<T>where
T: Serialize,
source§impl<T: SubAssign<T> + Copy> SubAssign for LogicalVec2<T>
impl<T: SubAssign<T> + Copy> SubAssign for LogicalVec2<T>
source§fn sub_assign(&mut self, other: LogicalVec2<T>)
fn sub_assign(&mut self, other: LogicalVec2<T>)
Performs the
-=
operation. Read moresource§impl<Unit: Copy> ToLogical<Unit, LogicalVec2<Unit>> for PhysicalSize<Unit>
impl<Unit: Copy> ToLogical<Unit, LogicalVec2<Unit>> for PhysicalSize<Unit>
fn to_logical(&self, writing_mode: WritingMode) -> LogicalVec2<Unit>
source§impl ToLogicalWithContainingBlock<LogicalVec2<Au>> for PhysicalPoint<Au>
impl ToLogicalWithContainingBlock<LogicalVec2<Au>> for PhysicalPoint<Au>
fn to_logical(&self, containing_block: &ContainingBlock<'_>) -> LogicalVec2<Au>
impl<T: Copy> Copy for LogicalVec2<T>
impl<T> StructuralPartialEq for LogicalVec2<T>
Auto Trait Implementations§
impl<T> Freeze for LogicalVec2<T>where
T: Freeze,
impl<T> RefUnwindSafe for LogicalVec2<T>where
T: RefUnwindSafe,
impl<T> Send for LogicalVec2<T>where
T: Send,
impl<T> Sync for LogicalVec2<T>where
T: Sync,
impl<T> Unpin for LogicalVec2<T>where
T: Unpin,
impl<T> UnwindSafe for LogicalVec2<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
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.