#[non_exhaustive]pub struct Cell {
pub character: char,
pub coordinates: (u32, u32),
pub bg: Option<Colour>,
pub fg: Option<Colour>,
}Expand description
A cell represents a single character in the terminal.
It can be sent from Tattoy to communicate the contents of the user’s terminal. And it can also be sent from a plugin to communicate the contents to be composited in a Tattoy layer.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.character: charThe cell’s character.
coordinates: (u32, u32)The coordinates of the cell. [0, 0] is in the top-left.
bg: Option<Colour>An optional colour for the cell’s background. If None (or null in the case of JSON) is
used then the terminal’s default background colour will be used.
fg: Option<Colour>An optional colour for the cell’s foreground. If None (or null in the case of JSON) is
used then the terminal’s default foreground colour will be used.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cell
impl<'de> Deserialize<'de> for Cell
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy 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 UnsafeUnpin 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