#[non_exhaustive]pub struct Pixel {
pub coordinates: (u32, u32),
pub color: Option<Colour>,
}Expand description
Output from the plugin that renders pixels in the terminal.
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.coordinates: (u32, u32)The coordinates of the pixel. [0, 0] is in the top-left. The y-axis is twice as long as the number of rows in the terminal because 2 “pixels” can fit in a single TTY cell using the UTF8 half-block trick: ▀▄▀▄
color: Option<Colour>An optional colour for the pixel. If None (or null in the case of JSON) is used then
the default foreground colour is used.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pixel
impl<'de> Deserialize<'de> for Pixel
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 Pixel
Auto Trait Implementations§
impl Freeze for Pixel
impl RefUnwindSafe for Pixel
impl Send for Pixel
impl Sync for Pixel
impl Unpin for Pixel
impl UnsafeUnpin for Pixel
impl UnwindSafe for Pixel
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