pub struct StyledTextRef<'a> {
pub text: &'a str,
pub span_styles: &'a [RangeStyle<SpanStyle>],
}Expand description
The slice of a text payload that solid-run rasterization reads: content
plus span styles. Borrowable from both an AnnotatedString (UI-side
text) and a RenderString (a lowered scene’s link-handler-free view),
so the run collectors serve both without copying either.
Fields§
§text: &'a str§span_styles: &'a [RangeStyle<SpanStyle>]Trait Implementations§
Source§impl<'a> Clone for StyledTextRef<'a>
impl<'a> Clone for StyledTextRef<'a>
Source§fn clone(&self) -> StyledTextRef<'a>
fn clone(&self) -> StyledTextRef<'a>
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 moreimpl<'a> Copy for StyledTextRef<'a>
Source§impl<'a> From<&'a AnnotatedString> for StyledTextRef<'a>
impl<'a> From<&'a AnnotatedString> for StyledTextRef<'a>
Source§fn from(text: &'a AnnotatedString) -> Self
fn from(text: &'a AnnotatedString) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a RenderString> for StyledTextRef<'a>
impl<'a> From<&'a RenderString> for StyledTextRef<'a>
Source§fn from(text: &'a RenderString) -> Self
fn from(text: &'a RenderString) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for StyledTextRef<'a>
impl<'a> RefUnwindSafe for StyledTextRef<'a>
impl<'a> Send for StyledTextRef<'a>
impl<'a> Sync for StyledTextRef<'a>
impl<'a> Unpin for StyledTextRef<'a>
impl<'a> UnsafeUnpin for StyledTextRef<'a>
impl<'a> UnwindSafe for StyledTextRef<'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