[−][src]Struct tui::widgets::Paragraph
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);
Methods
impl<'a, 't, T> Paragraph<'a, 't, T> where
T: Iterator<Item = &'t Text<'t>>,
[src]
T: Iterator<Item = &'t Text<'t>>,
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
Auto Trait Implementations
impl<'a, 't, T> Send for Paragraph<'a, 't, T> where
T: Send,
T: Send,
impl<'a, 't, T> Sync for Paragraph<'a, 't, T> where
T: Sync,
T: Sync,
impl<'a, 't, T> Unpin for Paragraph<'a, 't, T> where
T: Unpin,
T: Unpin,
impl<'a, 't, T> UnwindSafe for Paragraph<'a, 't, T> where
T: UnwindSafe,
T: UnwindSafe,
impl<'a, 't, T> RefUnwindSafe for Paragraph<'a, 't, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,