pub struct TextRun<'a> {
pub text: &'a str,
pub style: StyleId,
}Expand description
A run of text in one style, for rs-rich-ext’s fast path
(Screen::write_runs): the text borrowed, the style an id already
interned in the screen written to. rich’s Segment owns its text and
its Style; a run owns neither, so a line of runs costs no
allocation a run.
Fields§
§text: &'a str§style: StyleIdImplementations§
Trait Implementations§
impl<'a> Copy for TextRun<'a>
impl<'a> Eq for TextRun<'a>
impl<'a> StructuralPartialEq for TextRun<'a>
Auto Trait Implementations§
impl<'a> Freeze for TextRun<'a>
impl<'a> RefUnwindSafe for TextRun<'a>
impl<'a> Send for TextRun<'a>
impl<'a> Sync for TextRun<'a>
impl<'a> Unpin for TextRun<'a>
impl<'a> UnsafeUnpin for TextRun<'a>
impl<'a> UnwindSafe for TextRun<'a>
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§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.