pub struct AttributedString { /* private fields */ }Implementations§
Source§impl AttributedString
impl AttributedString
pub fn new(text: impl Into<String>) -> Result<Self>
pub fn text(&self) -> &str
pub fn default_attributes(&self) -> &TextAttributes
pub fn runs(&self) -> &[AttributeRun]
pub fn with_default_attributes(self, attributes: TextAttributes) -> Result<Self>
pub fn push_run( &mut self, range: TextRange, attributes: TextAttributes, ) -> Result<()>
pub fn with_run( self, range: TextRange, attributes: TextAttributes, ) -> Result<Self>
Trait Implementations§
Source§impl Clone for AttributedString
impl Clone for AttributedString
Source§fn clone(&self) -> AttributedString
fn clone(&self) -> AttributedString
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 AttributedString
impl Debug for AttributedString
Source§impl PartialEq for AttributedString
impl PartialEq for AttributedString
Source§fn eq(&self, other: &AttributedString) -> bool
fn eq(&self, other: &AttributedString) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl TryFrom<&TextBlock> for AttributedString
impl TryFrom<&TextBlock> for AttributedString
Source§impl TryFrom<TextBlock> for AttributedString
impl TryFrom<TextBlock> for AttributedString
impl StructuralPartialEq for AttributedString
Auto Trait Implementations§
impl Freeze for AttributedString
impl RefUnwindSafe for AttributedString
impl Send for AttributedString
impl Sync for AttributedString
impl Unpin for AttributedString
impl UnsafeUnpin for AttributedString
impl UnwindSafe for AttributedString
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