Struct layout_2020::geom::LogicalSides
source · pub struct LogicalSides<T> {
pub inline_start: T,
pub inline_end: T,
pub block_start: T,
pub block_end: T,
}
Fields§
§inline_start: T
§inline_end: T
§block_start: T
§block_end: T
Implementations§
source§impl<T: Clone> LogicalSides<T>
impl<T: Clone> LogicalSides<T>
pub fn from_physical(sides: &PhysicalSides<T>, mode: WritingMode) -> Self
source§impl<T> LogicalSides<T>
impl<T> LogicalSides<T>
pub fn map<U>(&self, f: impl Fn(&T) -> U) -> LogicalSides<U>
pub fn map_inline_and_block_axes<U>( &self, inline_f: impl Fn(&T) -> U, block_f: impl Fn(&T) -> U, ) -> LogicalSides<U>
pub fn inline_sum(&self) -> T::Output
pub fn block_sum(&self) -> T::Output
pub fn sum(&self) -> LogicalVec2<T::Output>
pub fn to_physical(&self, mode: WritingMode) -> PhysicalSides<T>where
T: Clone,
source§impl<T: Copy> LogicalSides<T>
impl<T: Copy> LogicalSides<T>
pub fn start_offset(&self) -> LogicalVec2<T>
source§impl LogicalSides<&LengthPercentage>
impl LogicalSides<&LengthPercentage>
pub fn percentages_relative_to(&self, basis: Au) -> LogicalSides<Au>
source§impl LogicalSides<LengthPercentageOrAuto<'_>>
impl LogicalSides<LengthPercentageOrAuto<'_>>
pub fn percentages_relative_to(&self, basis: Au) -> LogicalSides<AuOrAuto>
source§impl<T: Clone> LogicalSides<GenericLengthPercentageOrAuto<T>>
impl<T: Clone> LogicalSides<GenericLengthPercentageOrAuto<T>>
pub fn auto_is(&self, f: impl Fn() -> T) -> LogicalSides<T>
source§impl<T: Zero> LogicalSides<T>
impl<T: Zero> LogicalSides<T>
pub(crate) fn zero() -> LogicalSides<T>
Trait Implementations§
source§impl<T: Clone> Clone for LogicalSides<T>
impl<T: Clone> Clone for LogicalSides<T>
source§fn clone(&self) -> LogicalSides<T>
fn clone(&self) -> LogicalSides<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 LogicalSides<T>
impl<T: Debug> Debug for LogicalSides<T>
source§impl From<LogicalSides<Au>> for LogicalSides<CSSPixelLength>
impl From<LogicalSides<Au>> for LogicalSides<CSSPixelLength>
source§fn from(value: LogicalSides<Au>) -> Self
fn from(value: LogicalSides<Au>) -> Self
Converts to this type from the input type.
source§impl From<LogicalSides<CSSPixelLength>> for LogicalSides<Au>
impl From<LogicalSides<CSSPixelLength>> for LogicalSides<Au>
source§fn from(value: LogicalSides<CSSPixelLength>) -> Self
fn from(value: LogicalSides<CSSPixelLength>) -> Self
Converts to this type from the input type.
source§impl<T> Serialize for LogicalSides<T>where
T: Serialize,
impl<T> Serialize for LogicalSides<T>where
T: Serialize,
source§impl<Unit: Copy> ToLogical<Unit, LogicalSides<Unit>> for PhysicalSides<Unit>
impl<Unit: Copy> ToLogical<Unit, LogicalSides<Unit>> for PhysicalSides<Unit>
fn to_logical(&self, writing_mode: WritingMode) -> LogicalSides<Unit>
impl<T: Copy> Copy for LogicalSides<T>
Auto Trait Implementations§
impl<T> Freeze for LogicalSides<T>where
T: Freeze,
impl<T> RefUnwindSafe for LogicalSides<T>where
T: RefUnwindSafe,
impl<T> Send for LogicalSides<T>where
T: Send,
impl<T> Sync for LogicalSides<T>where
T: Sync,
impl<T> Unpin for LogicalSides<T>where
T: Unpin,
impl<T> UnwindSafe for LogicalSides<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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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