pub struct TextSpan {
pub start: u32,
pub end: u32,
pub style: ResolvedTextStyle,
}Expand description
A run of characters with one style.
Offsets are in UTF-16 code units, which is what both Apple
(NSAttributedString) and Android (Spannable) text APIs index by.
Fields§
§start: u32Start offset (UTF-16 units, inclusive).
end: u32End offset (UTF-16 units, exclusive).
style: ResolvedTextStyleStyle of the run.
Trait Implementations§
impl Copy for TextSpan
impl StructuralPartialEq for TextSpan
Auto Trait Implementations§
impl Forget for TextSpan
impl Freeze for TextSpan
impl Move for TextSpan
impl RefUnwindSafe for TextSpan
impl Send for TextSpan
impl Sync for TextSpan
impl Unpin for TextSpan
impl UnsafeUnpin for TextSpan
impl UnwindSafe for TextSpan
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