pub struct Text(_, _);Expand description
A tuple of text content and optional styling.
Implementations
sourceimpl 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 StructuralEq for Text
impl StructuralPartialEq for Text
Auto Trait Implementations
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more