pub struct TextRun {
pub start: usize,
pub end: usize,
pub script: Script,
pub direction: RunDirection,
pub style_id: u64,
}Expand description
A fully partitioned text run suitable for shaping.
Combines script, direction, and style identity into the atomic unit that a shaping engine processes. Each field boundary triggers a new run.
Fields§
§start: usizeStart byte offset (inclusive) in the source string.
end: usizeEnd byte offset (exclusive) in the source string.
script: ScriptResolved Unicode script.
direction: RunDirectionText direction for this run.
style_id: u64Opaque style discriminant for cache keying. Two runs with different styles must be shaped separately even if script and direction match (e.g., bold vs regular affects glyph selection).
Implementations§
Trait Implementations§
impl Eq for TextRun
impl StructuralPartialEq for TextRun
Auto Trait Implementations§
impl Freeze for TextRun
impl RefUnwindSafe for TextRun
impl Send for TextRun
impl Sync for TextRun
impl Unpin for TextRun
impl UnsafeUnpin for TextRun
impl UnwindSafe for TextRun
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.