pub struct Text {
pub lines: Vec<Line>,
pub alignment: Option<Alignment>,
}Fields§
§lines: Vec<Line>§alignment: Option<Alignment>Implementations§
Source§impl Text
impl Text
pub fn raw(content: impl Into<String>) -> Self
pub fn styled(content: impl Into<String>, style: Style) -> Self
pub fn alignment(self, alignment: Alignment) -> Self
pub fn left_aligned(self) -> Self
pub fn centered(self) -> Self
pub fn right_aligned(self) -> Self
pub fn height(&self) -> usize
pub fn width(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn plain(&self) -> String
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 UnsafeUnpin 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