Struct layout_2020::flow::inline::line::AtomicLineItem
source · pub(super) struct AtomicLineItem {
pub fragment: BoxFragment,
pub size: LogicalVec2<Au>,
pub positioning_context: Option<PositioningContext>,
pub baseline_offset_in_parent: Au,
pub baseline_offset_in_item: Au,
pub bidi_level: Level,
}
Fields§
§fragment: BoxFragment
§size: LogicalVec2<Au>
§positioning_context: Option<PositioningContext>
§baseline_offset_in_parent: Au
The block offset of this items’ baseline relative to the baseline of the line.
This will be zero for boxes with vertical-align: top
and vertical-align: bottom
since their baselines are calculated late in layout.
baseline_offset_in_item: Au
The offset of the baseline inside this item.
bidi_level: Level
The BiDi level of this AtomicLineItem
to enable reordering.
Implementations§
source§impl AtomicLineItem
impl AtomicLineItem
sourcefn calculate_block_start(&self, line_metrics: &LineMetrics) -> Au
fn calculate_block_start(&self, line_metrics: &LineMetrics) -> Au
Given the metrics for a line, our vertical alignment, and our block size, find a block start position relative to the top of the line.
Auto Trait Implementations§
impl Freeze for AtomicLineItem
impl !RefUnwindSafe for AtomicLineItem
impl Send for AtomicLineItem
impl Sync for AtomicLineItem
impl Unpin for AtomicLineItem
impl !UnwindSafe for AtomicLineItem
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