pub struct TextRunSpec {
pub element_id: u64,
pub value: String,
pub character_lengths: Vec<u8>,
pub word_starts: Vec<u8>,
pub character_positions: Vec<f32>,
pub character_widths: Vec<f32>,
pub bounds: Rect,
pub bounds_are_absolute: bool,
pub text_direction: TextDirection,
pub attrs: TextRunAttributes,
}Expand description
Everything one Role::TextRun node needs.
Fields§
§element_id: u64Mixed with the owner and the run kind to derive the node id.
value: String§character_lengths: Vec<u8>UTF-8 byte length of each character of value. Their sum must be
value.len(); AccessKit panics otherwise.
word_starts: Vec<u8>§character_positions: Vec<f32>§character_widths: Vec<f32>§bounds: Rect§bounds_are_absolute: booltrue when bounds is already in window space.
text_direction: TextDirection§attrs: TextRunAttributesTrait Implementations§
Source§impl Clone for TextRunSpec
impl Clone for TextRunSpec
Source§fn clone(&self) -> TextRunSpec
fn clone(&self) -> TextRunSpec
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 TextRunSpec
impl RefUnwindSafe for TextRunSpec
impl Send for TextRunSpec
impl Sync for TextRunSpec
impl Unpin for TextRunSpec
impl UnsafeUnpin for TextRunSpec
impl UnwindSafe for TextRunSpec
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