pub struct TextSpan {
pub content: String,
pub fg: Color,
pub bg: Color,
pub modifiers: Modifier,
}
Expand description
§TextSpan
TextSpan is a “cell” of text with its attributes
Fields§
§content: String
§fg: Color
§bg: Color
§modifiers: Modifier
Implementations§
source§impl TextSpan
impl TextSpan
pub fn fg(self, fg: Color) -> Self
pub fn bg(self, bg: Color) -> Self
sourcepub fn underlined(self) -> Self
pub fn underlined(self) -> Self
Set underlined property for text
sourcepub fn slow_blink(self) -> Self
pub fn slow_blink(self) -> Self
Set slow_blink property for text
sourcepub fn rapid_blink(self) -> Self
pub fn rapid_blink(self) -> Self
Set rapid_blink property for text
sourcepub fn strikethrough(self) -> Self
pub fn strikethrough(self) -> Self
Set strikethrough property for text
Trait Implementations§
source§impl PartialEq for TextSpan
impl PartialEq for TextSpan
impl Eq for TextSpan
impl StructuralPartialEq for TextSpan
Auto Trait Implementations§
impl RefUnwindSafe for TextSpan
impl Send for TextSpan
impl Sync for TextSpan
impl Unpin for TextSpan
impl UnwindSafe for TextSpan
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