pub struct Line {
pub spans: Vec<Span>,
pub alignment: Option<Alignment>,
}Fields§
§spans: Vec<Span>§alignment: Option<Alignment>Implementations§
Source§impl Line
impl Line
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 width(&self) -> usize
pub const fn height(&self) -> usize
pub fn plain(&self) -> String
Trait Implementations§
impl Eq for Line
impl StructuralPartialEq for Line
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnsafeUnpin for Line
impl UnwindSafe for Line
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