pub struct RichTextSpan {
pub text: String,
pub style: RichTextSpanStyle,
pub children: Vec<RichTextChild>,
pub semantics_label: Option<String>,
pub semantics_identifier: Option<String>,
pub spell_out: Option<bool>,
pub mouse_cursor: Option<MouseCursor>,
pub actions: Vec<ActionEntry>,
}Fields§
§text: String§style: RichTextSpanStyle§children: Vec<RichTextChild>§semantics_label: Option<String>§semantics_identifier: Option<String>§spell_out: Option<bool>§mouse_cursor: Option<MouseCursor>§actions: Vec<ActionEntry>Implementations§
Source§impl RichTextSpan
impl RichTextSpan
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 weight(self, weight: u16) -> Self
pub fn locale(self, locale: impl Into<String>) -> 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 mouse_cursor(self, mouse_cursor: IrMouseCursor) -> Self
pub fn on_tap(self, action: ActionEnvelope) -> Self
pub fn on_hover_enter(self, action: ActionEnvelope) -> Self
pub fn on_hover_exit(self, action: ActionEnvelope) -> Self
pub fn on_secondary_click(self, action: ActionEnvelope) -> Self
pub fn child<T>(self, child: T) -> Selfwhere
T: Into<RichTextChild>,
pub fn children<I, T>(self, children: I) -> Self
Trait Implementations§
Source§impl Clone for RichTextSpan
impl Clone for RichTextSpan
Source§fn clone(&self) -> RichTextSpan
fn clone(&self) -> RichTextSpan
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 RichTextSpan
impl Debug for RichTextSpan
Source§impl Default for RichTextSpan
impl Default for RichTextSpan
Source§fn default() -> RichTextSpan
fn default() -> RichTextSpan
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RichTextSpan
impl<'de> Deserialize<'de> for RichTextSpan
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 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 From<RichTextSpan> for RichTextChild
impl From<RichTextSpan> for RichTextChild
Source§fn from(value: RichTextSpan) -> Self
fn from(value: RichTextSpan) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RichTextSpan
impl PartialEq for RichTextSpan
Source§fn eq(&self, other: &RichTextSpan) -> bool
fn eq(&self, other: &RichTextSpan) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RichTextSpan
impl Serialize for RichTextSpan
impl StructuralPartialEq for RichTextSpan
Auto Trait Implementations§
impl Freeze for RichTextSpan
impl !RefUnwindSafe for RichTextSpan
impl Send for RichTextSpan
impl Sync for RichTextSpan
impl Unpin for RichTextSpan
impl UnsafeUnpin for RichTextSpan
impl !UnwindSafe for RichTextSpan
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.