pub struct FormatContent<F> { /* private fields */ }
Expand description
A lambda which formats cell content.
Implementations§
Source§impl<F> FormatContent<F>
impl<F> FormatContent<F>
Sourcepub fn multiline(self) -> Self
pub fn multiline(self) -> Self
Multiline a helper function for changing multiline content of cell. Using this formatting applied for all rows not to a string as a whole.
use tabled::{Table, settings::{Format, object::Segment, Modify}};
let data: Vec<&'static str> = Vec::new();
let table = Table::new(&data)
.with(Modify::new(Segment::all()).with(Format::content(|s| s.to_string()).multiline()))
.to_string();
Trait Implementations§
Source§impl<F, R, C> CellOption<R, C> for FormatContent<F>where
F: FnMut(&str) -> String + Clone,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
impl<F, R, C> CellOption<R, C> for FormatContent<F>where
F: FnMut(&str) -> String + Clone,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
Source§impl<F: Clone> Clone for FormatContent<F>
impl<F: Clone> Clone for FormatContent<F>
Source§fn clone(&self) -> FormatContent<F>
fn clone(&self) -> FormatContent<F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<F: Debug> Debug for FormatContent<F>
impl<F: Debug> Debug for FormatContent<F>
Source§impl<F: Ord> Ord for FormatContent<F>
impl<F: Ord> Ord for FormatContent<F>
Source§fn cmp(&self, other: &FormatContent<F>) -> Ordering
fn cmp(&self, other: &FormatContent<F>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<F: PartialEq> PartialEq for FormatContent<F>
impl<F: PartialEq> PartialEq for FormatContent<F>
Source§impl<F: PartialOrd> PartialOrd for FormatContent<F>
impl<F: PartialOrd> PartialOrd for FormatContent<F>
Source§impl<F, R, D, C> TableOption<R, C, D> for FormatContent<F>where
F: FnMut(&str) -> String + Clone,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
impl<F, R, D, C> TableOption<R, C, D> for FormatContent<F>where
F: FnMut(&str) -> String + Clone,
R: Records + ExactRecords + PeekableRecords + RecordsMut<String>,
impl<F: Eq> Eq for FormatContent<F>
impl<F> StructuralPartialEq for FormatContent<F>
Auto Trait Implementations§
impl<F> Freeze for FormatContent<F>where
F: Freeze,
impl<F> RefUnwindSafe for FormatContent<F>where
F: RefUnwindSafe,
impl<F> Send for FormatContent<F>where
F: Send,
impl<F> Sync for FormatContent<F>where
F: Sync,
impl<F> Unpin for FormatContent<F>where
F: Unpin,
impl<F> UnwindSafe for FormatContent<F>where
F: UnwindSafe,
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