pub enum LabelPatch {
Text(String),
Color(Option<Color>),
Font(FontSpec),
Runs(String, Vec<TextRun>),
}Variants§
Text(String)
Color(Option<Color>)
Font(FontSpec)
Runs(String, Vec<TextRun>)
New text and its runs together. One patch, not two: a run’s byte range is only meaningful against a particular string, so applying them separately would leave the widget briefly holding ranges that point into the wrong text.
Trait Implementations§
Source§impl Clone for LabelPatch
impl Clone for LabelPatch
Source§fn clone(&self) -> LabelPatch
fn clone(&self) -> LabelPatch
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 moreSource§impl Debug for LabelPatch
impl Debug for LabelPatch
Source§impl PartialEq for LabelPatch
impl PartialEq for LabelPatch
impl StructuralPartialEq for LabelPatch
Auto Trait Implementations§
impl Freeze for LabelPatch
impl RefUnwindSafe for LabelPatch
impl Send for LabelPatch
impl Sync for LabelPatch
impl Unpin for LabelPatch
impl UnsafeUnpin for LabelPatch
impl UnwindSafe for LabelPatch
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