pub struct Cell { /* private fields */ }
Expand description
A cell that stores a symbol, and the style that will be applied to it.
Implementations§
Source§impl Cell
impl Cell
pub fn new<S: Into<ContentStyle>>( text: impl Into<CompactString>, style: S, ) -> Self
pub fn string(string: impl AsRef<str>) -> Self
pub fn chr(chr: char) -> Self
pub fn styled<D: Display>(content: StyledContent<D>) -> Self
pub fn is_empty(&self) -> bool
pub fn text(&self) -> &str
pub fn style(&self) -> &ContentStyle
Trait Implementations§
Source§impl<D: Display> From<StyledContent<D>> for Cell
impl<D: Display> From<StyledContent<D>> for Cell
Source§fn from(value: StyledContent<D>) -> Self
fn from(value: StyledContent<D>) -> Self
Converts to this type from the input type.
impl Eq for Cell
impl StructuralPartialEq for Cell
Auto Trait Implementations§
impl Freeze for Cell
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin for Cell
impl UnwindSafe for Cell
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> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more