pub struct FormattedText {
pub text: String,
pub format: TextFormat,
}Expand description
Formatted text with styling
Fields§
§text: String§format: TextFormatImplementations§
Source§impl FormattedText
impl FormattedText
Sourcepub fn with_format(self, format: TextFormat) -> Self
pub fn with_format(self, format: TextFormat) -> Self
Apply formatting
Sourcepub fn strikethrough(self) -> Self
pub fn strikethrough(self) -> Self
Builder method for strikethrough
Sourcepub fn superscript(self) -> Self
pub fn superscript(self) -> Self
Builder method for superscript
Trait Implementations§
Source§impl Clone for FormattedText
impl Clone for FormattedText
Source§fn clone(&self) -> FormattedText
fn clone(&self) -> FormattedText
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 moreAuto Trait Implementations§
impl Freeze for FormattedText
impl RefUnwindSafe for FormattedText
impl Send for FormattedText
impl Sync for FormattedText
impl Unpin for FormattedText
impl UnwindSafe for FormattedText
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