pub struct Itemizer { /* private fields */ }Expand description
Splits text into the items a shaper takes, in logical order: paragraphs at
bidi paragraph separators, each with the direction TextDirection gives
it, then the runs of one bidi level, one script, one style span and one
typeface of that span. Keeps its scratch storage from one text to the next.
Implementations§
Source§impl Itemizer
impl Itemizer
Sourcepub fn itemize<'r>(
&mut self,
text: &str,
direction: TextDirection,
spans: &[ShapingSpan<'_>],
resolver: &'r FontFamilyResolver,
visit: impl FnMut(TextItem<'r>),
)
pub fn itemize<'r>( &mut self, text: &str, direction: TextDirection, spans: &[ShapingSpan<'_>], resolver: &'r FontFamilyResolver, visit: impl FnMut(TextItem<'r>), )
Passes the items of text to visit. spans cover the text in
order with no gap.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Itemizer
impl Freeze for Itemizer
impl Move for Itemizer
impl RefUnwindSafe for Itemizer
impl Send for Itemizer
impl Sync for Itemizer
impl Unpin for Itemizer
impl UnsafeUnpin for Itemizer
impl UnwindSafe for Itemizer
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