pub struct TextLineIter<'a> { /* private fields */ }Expand description
๐ ๐งฑ ๐ Iterates fixed-width inline layout steps over a symbol stream.
๐ text/layout::TextLineIter
๐ฆ size_of::<TextLineIter>() == 24 bytes / 192 bits #๏ธโฃ #[cfg(target_pointer_width = โ32โ)]
๐ฆ size_of::<TextLineIter>() == 40 bytes / 320 bits #๏ธโฃ #[cfg(target_pointer_width = โ64โ)]
TextLineIter repeatedly applies TextLayout::step with the same inline
width, advancing through the returned carry cursor.
This is mechanical line stepping. It does not perform semantic prose wrapping, whitespace trimming, paragraph handling, indentation, or hard-break handling.
Implementationsยง
Sourceยงimpl<'a> TextLineIter<'a>
impl<'a> TextLineIter<'a>
Sourcepub const fn new(
layout: &'a TextLayout,
symbols: &'a [TextSymbol],
width: TextUnit,
) -> Self
pub const fn new( layout: &'a TextLayout, symbols: &'a [TextSymbol], width: TextUnit, ) -> Self
Creates a line iterator starting at the beginning of symbols.
Sourcepub const fn from_cursor(
layout: &'a TextLayout,
symbols: &'a [TextSymbol],
cursor: TextCursor,
width: TextUnit,
) -> Self
pub const fn from_cursor( layout: &'a TextLayout, symbols: &'a [TextSymbol], cursor: TextCursor, width: TextUnit, ) -> Self
Creates a line iterator starting at cursor.
Sourcepub const fn cursor(&self) -> TextCursor
pub const fn cursor(&self) -> TextCursor
Returns the current continuation cursor.
Sourcepub const fn is_done(&self) -> bool
pub const fn is_done(&self) -> bool
Returns whether this iterator has terminated and can produce no further steps.
Sourcepub const fn next(
&mut self,
out_spans: &mut [TextLayoutSpan],
) -> Option<TextLayoutStep> โ
pub const fn next( &mut self, out_spans: &mut [TextLayoutSpan], ) -> Option<TextLayoutStep> โ
Computes the next fixed-width layout step.
Writes the produced spans into out_spans and returns the step outcome.
The valid output span prefix is &out_spans[..step.span_count].
Trait Implementationsยง
Sourceยงimpl<'a> Clone for TextLineIter<'a>
impl<'a> Clone for TextLineIter<'a>
Sourceยงfn clone(&self) -> TextLineIter<'a>
fn clone(&self) -> TextLineIter<'a>
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for TextLineIter<'a>
Sourceยงimpl<'a> Debug for TextLineIter<'a>
impl<'a> Debug for TextLineIter<'a>
impl<'a> Eq for TextLineIter<'a>
Sourceยงimpl<'a> Hash for TextLineIter<'a>
impl<'a> Hash for TextLineIter<'a>
Sourceยงimpl<'a> PartialEq for TextLineIter<'a>
impl<'a> PartialEq for TextLineIter<'a>
impl<'a> StructuralPartialEq for TextLineIter<'a>
Auto Trait Implementationsยง
impl<'a> Freeze for TextLineIter<'a>
impl<'a> RefUnwindSafe for TextLineIter<'a>
impl<'a> Send for TextLineIter<'a>
impl<'a> Sync for TextLineIter<'a>
impl<'a> Unpin for TextLineIter<'a>
impl<'a> UnsafeUnpin for TextLineIter<'a>
impl<'a> UnwindSafe for TextLineIter<'a>
Blanket Implementationsยง
Sourceยงimpl<T> AnyExt for T
impl<T> AnyExt for T
Sourceยงfn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
TypeId of Self using a custom hasher.Sourceยงfn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Sourceยงfn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
alloc only.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
Sourceยงimpl<T> ByteSized for T
impl<T> ByteSized for T
Sourceยงconst BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Sourceยงfn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Sourceยงfn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<T> MemExt for Twhere
T: ?Sized,
impl<T> MemExt for Twhere
T: ?Sized,
Sourceยงconst NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Sourceยงfn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Sourceยงfn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Sourceยงfn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> usize
Sourceยงfn mem_size_of_val(&self) -> usize
fn mem_size_of_val(&self) -> usize
Sourceยงfn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true if dropping values of this type matters. Read moreSourceยงfn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self without running its destructor. Read moreSourceยงfn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Sourceยงunsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงunsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงfn mem_as_bytes(&self) -> &[u8] โ
fn mem_as_bytes(&self) -> &[u8] โ
unsafe_slice only.