pub struct Cell<'txt> { /* private fields */ }
Expand description
A table cell containing some str content.
A cell may span multiple columns by setting the value of col_span
.
pad_content
will add a space to either side of the cell’s content.
Implementations§
Source§impl<'txt> Cell<'txt>
impl<'txt> Cell<'txt>
pub fn with_content(self, content: impl Into<Cow<'txt, str>>) -> Self
pub fn set_content(&mut self, content: impl Into<Cow<'txt, str>>) -> &mut Self
Sourcepub fn with_col_span(self, col_span: usize) -> Self
pub fn with_col_span(self, col_span: usize) -> Self
Sourcepub fn set_col_span(&mut self, col_span: usize) -> &mut Self
pub fn set_col_span(&mut self, col_span: usize) -> &mut Self
pub fn with_alignment(self, alignment: Alignment) -> Self
pub fn set_alignment(&mut self, alignment: Alignment) -> &mut Self
pub fn with_padding(self, padding: bool) -> Self
pub fn set_padding(&mut self, padding: bool) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl<'txt> !Freeze for Cell<'txt>
impl<'txt> !RefUnwindSafe for Cell<'txt>
impl<'txt> Send for Cell<'txt>
impl<'txt> !Sync for Cell<'txt>
impl<'txt> Unpin for Cell<'txt>
impl<'txt> UnwindSafe for Cell<'txt>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more