[][src]Struct tui::widgets::Paragraph

pub struct Paragraph<'a, 't, T> where
    T: Iterator<Item = &'t Text<'t>>, 
{ /* fields omitted */ }

A widget to display some text.

Examples

let text = [
    Text::raw("First line\n"),
    Text::styled("Second line\n", Style::default().fg(Color::Red))
];
Paragraph::new(text.iter())
    .block(Block::default().title("Paragraph").borders(Borders::ALL))
    .style(Style::default().fg(Color::White).bg(Color::Black))
    .alignment(Alignment::Center)
    .wrap(true);

Implementations

impl<'a, 't, T> Paragraph<'a, 't, T> where
    T: Iterator<Item = &'t Text<'t>>, 
[src]

pub fn new(text: T) -> Paragraph<'a, 't, T>[src]

pub fn block(self, block: Block<'a>) -> Paragraph<'a, 't, T>[src]

pub fn style(self, style: Style) -> Paragraph<'a, 't, T>[src]

pub fn wrap(self, flag: bool) -> Paragraph<'a, 't, T>[src]

pub fn raw(self, flag: bool) -> Paragraph<'a, 't, T>[src]

pub fn scroll(self, offset: u16) -> Paragraph<'a, 't, T>[src]

pub fn alignment(self, alignment: Alignment) -> Paragraph<'a, 't, T>[src]

Trait Implementations

impl<'a, 't, T: Clone> Clone for Paragraph<'a, 't, T> where
    T: Iterator<Item = &'t Text<'t>>, 
[src]

impl<'a, 't, T: Debug> Debug for Paragraph<'a, 't, T> where
    T: Iterator<Item = &'t Text<'t>>, 
[src]

impl<'a, 't, 'b, T> Widget for Paragraph<'a, 't, T> where
    T: Iterator<Item = &'t Text<'t>>, 
[src]

Auto Trait Implementations

impl<'a, 't, T> RefUnwindSafe for Paragraph<'a, 't, T> where
    T: RefUnwindSafe

impl<'a, 't, T> Send for Paragraph<'a, 't, T> where
    T: Send

impl<'a, 't, T> Sync for Paragraph<'a, 't, T> where
    T: Sync

impl<'a, 't, T> Unpin for Paragraph<'a, 't, T> where
    T: Unpin

impl<'a, 't, T> UnwindSafe for Paragraph<'a, 't, T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.