pub struct AttributedText {
pub text: Arc<str>,
pub spans: Arc<[TextSpan]>,
}Fields§
§text: Arc<str>§spans: Arc<[TextSpan]>Implementations§
Source§impl AttributedText
impl AttributedText
pub fn new(text: impl Into<Arc<str>>, spans: impl Into<Arc<[TextSpan]>>) -> Self
Sourcepub fn shaping_eq(&self, other: &Self) -> bool
pub fn shaping_eq(&self, other: &Self) -> bool
Returns true if self and other have identical shaping-relevant content.
This intentionally ignores paint-only fields (e.g. colors, underlines). It is useful for caching/layout decisions where theme-driven paint changes should not force reshaping.
pub fn is_valid(&self) -> bool
Trait Implementations§
Source§impl Clone for AttributedText
impl Clone for AttributedText
Source§fn clone(&self) -> AttributedText
fn clone(&self) -> AttributedText
Returns a duplicate of the value. Read more
1.0.0 · 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 AttributedText
impl Debug for AttributedText
Source§impl PartialEq for AttributedText
impl PartialEq for AttributedText
impl StructuralPartialEq for AttributedText
Auto Trait Implementations§
impl Freeze for AttributedText
impl RefUnwindSafe for AttributedText
impl Send for AttributedText
impl Sync for AttributedText
impl Unpin for AttributedText
impl UnsafeUnpin for AttributedText
impl UnwindSafe for AttributedText
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