pub struct RichText<'a> {
pub text: &'a str,
pub spans: &'a [Span<'a>],
pub style: TextStyle<'a>,
pub offset: LogicalPoint,
pub options: TextOptions,
}Expand description
text partitioned by ordered, contiguous spans
Fields§
§text: &'a str§spans: &'a [Span<'a>]§style: TextStyle<'a>§offset: LogicalPoint§options: TextOptionsImplementations§
Source§impl<'a> RichText<'a>
impl<'a> RichText<'a>
Sourcepub fn text(self, value: &'a str) -> Self
pub fn text(self, value: &'a str) -> Self
sets Self::text
Sourcepub fn spans(self, value: &'a [Span<'a>]) -> Self
pub fn spans(self, value: &'a [Span<'a>]) -> Self
sets Self::spans
Sourcepub fn style(self, value: TextStyle<'a>) -> Self
pub fn style(self, value: TextStyle<'a>) -> Self
sets Self::style
Sourcepub fn offset(self, value: LogicalPoint) -> Self
pub fn offset(self, value: LogicalPoint) -> Self
sets Self::offset
Sourcepub fn options(self, value: TextOptions) -> Self
pub fn options(self, value: TextOptions) -> Self
sets Self::options
Trait Implementations§
impl<'a> Copy for RichText<'a>
impl<'a> StructuralPartialEq for RichText<'a>
Auto Trait Implementations§
impl<'a> Forget for RichText<'a>
impl<'a> Freeze for RichText<'a>
impl<'a> Move for RichText<'a>
impl<'a> RefUnwindSafe for RichText<'a>
impl<'a> Send for RichText<'a>
impl<'a> Sync for RichText<'a>
impl<'a> Unpin for RichText<'a>
impl<'a> UnsafeUnpin for RichText<'a>where
&'a str: UnsafeUnpin,
&'a [Span<'a>]: UnsafeUnpin,
&'a [([u8; 4], u32)]: UnsafeUnpin,
&'a [([u8; 4], f32)]: UnsafeUnpin,
impl<'a> UnwindSafe for RichText<'a>where
&'a str: UnwindSafe,
&'a [Span<'a>]: UnwindSafe,
&'a [([u8; 4], u32)]: UnwindSafe,
&'a [([u8; 4], f32)]: UnwindSafe,
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