pub struct Text(/* private fields */);
Expand description
A tuple of text content and optional styling.
Implementations§
Source§impl Text
impl Text
Sourcepub fn new_styled(content: String, style: Style) -> Self
pub fn new_styled(content: String, style: Style) -> Self
Create a new, styled text segment.
Sourcepub fn as_segment(self) -> Segment
pub fn as_segment(self) -> Segment
This text as a single-element vector.
Trait Implementations§
impl Eq for Text
impl StructuralPartialEq for Text
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
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