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(crate) fn as_ref(&self) -> 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>
pub(crate) fn map_with<U, V>( &self, other: &LogicalVec2<U>, f: impl Fn(&T, &U) -> V, ) -> LogicalVec2<V>
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<Size<LengthPercentage>>
impl LogicalVec2<Size<LengthPercentage>>
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: Copy> From<T> for LogicalVec2<T>
impl<T: Copy> From<T> for LogicalVec2<T>
Source§impl<T: PartialEq> PartialEq for LogicalVec2<T>
impl<T: PartialEq> PartialEq for LogicalVec2<T>
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> 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 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()
.