pub struct RichTextRun {
pub text: String,
pub style: TextRunStyle,
pub semantics_label: Option<String>,
pub semantics_identifier: Option<String>,
pub spell_out: Option<bool>,
}Fields§
§text: String§style: TextRunStyle§semantics_label: Option<String>§semantics_identifier: Option<String>§spell_out: Option<bool>Implementations§
Source§impl RichTextRun
impl RichTextRun
pub fn new(text: impl Into<String>) -> Self
pub fn size(self, size: f32) -> Self
pub fn color(self, color: IrColor) -> Self
pub fn underline(self, underline: bool) -> Self
pub fn family(self, family: impl Into<String>) -> Self
pub fn locale(self, locale: impl Into<String>) -> Self
pub fn weight(self, weight: u16) -> Self
pub fn italic(self, italic: bool) -> Self
pub fn line_height(self, line_height: f32) -> Self
pub fn letter_spacing(self, letter_spacing: f32) -> Self
pub fn text_scale(self, text_scale: f32) -> Self
pub fn text_scaler(self, text_scaler: impl Into<TextScaler>) -> Self
pub fn background_color(self, color: IrColor) -> Self
pub fn semantics_label(self, label: impl Into<String>) -> Self
pub fn semantics_identifier(self, identifier: impl Into<String>) -> Self
pub fn spell_out(self, spell_out: bool) -> Self
pub fn into_span(self) -> RichTextSpan
Trait Implementations§
Source§impl Clone for RichTextRun
impl Clone for RichTextRun
Source§fn clone(&self) -> RichTextRun
fn clone(&self) -> RichTextRun
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 RichTextRun
impl Debug for RichTextRun
Source§impl<'de> Deserialize<'de> for RichTextRun
impl<'de> Deserialize<'de> for RichTextRun
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<RichTextRun> for RichTextChild
impl From<RichTextRun> for RichTextChild
Source§fn from(value: RichTextRun) -> Self
fn from(value: RichTextRun) -> Self
Converts to this type from the input type.
Source§impl From<RichTextRun> for RichTextSpan
impl From<RichTextRun> for RichTextSpan
Source§fn from(value: RichTextRun) -> Self
fn from(value: RichTextRun) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RichTextRun
impl PartialEq for RichTextRun
Source§fn eq(&self, other: &RichTextRun) -> bool
fn eq(&self, other: &RichTextRun) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RichTextRun
impl Serialize for RichTextRun
impl StructuralPartialEq for RichTextRun
Auto Trait Implementations§
impl Freeze for RichTextRun
impl RefUnwindSafe for RichTextRun
impl Send for RichTextRun
impl Sync for RichTextRun
impl Unpin for RichTextRun
impl UnsafeUnpin for RichTextRun
impl UnwindSafe for RichTextRun
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.