pub struct IntrinsicTextSizes {
pub min_content_width: f32,
pub max_content_width: f32,
pub max_content_height: f32,
}Expand description
Inline-axis intrinsic contributions derived from shaped text, without running the line-breaking stage of the pipeline.
Callers that only need min/max-content widths for sizing (see
calculate_ifc_root_intrinsic_sizes) should prefer this over invoking
layout_flow twice with AvailableSpace::MinContent/MaxContent. The
latter runs the full flow loop — including BreakCursor::peek_next_unit,
which clones every ShapedCluster it inspects — even though no constraint
actually limits the line width.
Fields§
§min_content_width: f32CSS min-content = widest unbreakable unit (word) along the inline axis.
max_content_width: f32CSS max-content = sum of all advances along the inline axis (single line).
max_content_height: f32Height of a single line box: max(ascent + descent) across all items.
Trait Implementations§
Source§impl Clone for IntrinsicTextSizes
impl Clone for IntrinsicTextSizes
Source§fn clone(&self) -> IntrinsicTextSizes
fn clone(&self) -> IntrinsicTextSizes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IntrinsicTextSizes
impl Debug for IntrinsicTextSizes
Source§impl Default for IntrinsicTextSizes
impl Default for IntrinsicTextSizes
Source§fn default() -> IntrinsicTextSizes
fn default() -> IntrinsicTextSizes
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IntrinsicTextSizes
impl RefUnwindSafe for IntrinsicTextSizes
impl Send for IntrinsicTextSizes
impl Sync for IntrinsicTextSizes
impl Unpin for IntrinsicTextSizes
impl UnsafeUnpin for IntrinsicTextSizes
impl UnwindSafe for IntrinsicTextSizes
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> 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 more