pub struct CachedLineBreaks {
pub line_ranges: Vec<(usize, usize)>,
pub line_widths: Vec<f32>,
pub available_width: f32,
}Expand description
Cached line break boundaries from a previous layout pass. Enables incremental relayout: when a word changes width, we can check if it still fits on the same line without re-running the full line-breaking algorithm.
Fields§
§line_ranges: Vec<(usize, usize)>Per-line: (first_item_idx, last_item_idx_exclusive) into positioned items.
line_widths: Vec<f32>Per-line total width (sum of item advances on that line).
available_width: f32The available width constraint used when these breaks were computed.
Trait Implementations§
Source§impl Clone for CachedLineBreaks
impl Clone for CachedLineBreaks
Source§fn clone(&self) -> CachedLineBreaks
fn clone(&self) -> CachedLineBreaks
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 moreAuto Trait Implementations§
impl Freeze for CachedLineBreaks
impl RefUnwindSafe for CachedLineBreaks
impl Send for CachedLineBreaks
impl Sync for CachedLineBreaks
impl Unpin for CachedLineBreaks
impl UnsafeUnpin for CachedLineBreaks
impl UnwindSafe for CachedLineBreaks
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