Struct titik::Cell [−][src]
Cell contains the attributes of the char used in the buffer. This information is needed when rendering each cell to the terminal
Fields
symbol: String
the character symbol
foreground_color: Option<Color>
The foreground color.
background_color: Option<Color>
The background color.
attributes: Attributes
List of attributes.
Implementations
impl Cell
[src]
pub fn new<S>(symbol: S) -> Self where
S: ToString,
[src]
S: ToString,
create a new Cell from character or string
pub fn unicode_width(&self) -> usize
[src]
returns the unicode width of the cell. Some characters are wide such as CJK
pub fn empty() -> Self
[src]
creates an empty Cell
pub fn bold(&mut self)
[src]
render this cell as bold
pub fn is_blank(&self) -> bool
[src]
whether or not this cell is blank
pub fn is_filler(&self) -> bool
[src]
whether or not this cell is a filler of a wide character that appears before it
pub fn attributes(&mut self, attributes: Vec<Attribute>)
[src]
return the attributes of this cell
pub fn color(&mut self, color: Color)
[src]
set the foreground color of this cell
pub fn background(&mut self, color: Color)
[src]
set the background color of this cell
Trait Implementations
impl Clone for Cell
[src]
impl Debug for Cell
[src]
impl Default for Cell
[src]
impl Display for Cell
[src]
impl PartialEq<Cell> for Cell
[src]
impl StructuralPartialEq for Cell
[src]
Auto Trait Implementations
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin for Cell
impl UnwindSafe for Cell
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub 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>,