#[non_exhaustive]pub struct DrawCell<'a> {
pub layer: u8,
pub pos: Pos,
pub tile: &'a Tile,
pub grapheme: Option<&'a str>,
pub tint: Tint,
}Expand description
One cell handed to a backend at draw time: the tile, plus the state that does not fit in one.
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.layer: u8Which layer this cell belongs to. Always 0 for cells arriving through
Output::draw.
pos: PosWhere the cell sits in the grid.
tile: &'a TileThe tile itself.
grapheme: Option<&'a str>The tile’s full grapheme cluster, or None to render Tile::glyph alone.
Some only for multi-codepoint clusters (combining marks, ZWJ sequences), and only
ever Some when the egc feature is enabled: without it Grid never populates the
side table, so a backend that does not support egc can ignore this entirely and render
from Tile::glyph.
tint: TintHow a pixel backend recolours this cell’s sprite.
Tint::None for the overwhelming majority of cells. Cell backends have no sprite to
recolour and ignore it; see Tint.
Implementations§
Source§impl<'a> DrawCell<'a>
impl<'a> DrawCell<'a>
Trait Implementations§
Source§impl<'a> PartialEq for DrawCell<'a>
impl<'a> PartialEq for DrawCell<'a>
impl<'a> Copy for DrawCell<'a>
impl<'a> Eq for DrawCell<'a>
impl<'a> StructuralPartialEq for DrawCell<'a>
Auto Trait Implementations§
impl<'a> Freeze for DrawCell<'a>
impl<'a> RefUnwindSafe for DrawCell<'a>
impl<'a> Send for DrawCell<'a>
impl<'a> Sync for DrawCell<'a>
impl<'a> Unpin for DrawCell<'a>
impl<'a> UnsafeUnpin for DrawCell<'a>
impl<'a> UnwindSafe for DrawCell<'a>
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,
§impl<C> WithAlpha for Cwhere
C: Copy,
impl<C> WithAlpha for Cwhere
C: Copy,
§fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
Wraps
self with alpha, storing alpha before the color in memory
(see [AlphaFirst]).§fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
Wraps
self with alpha, storing alpha after the color in memory
(see [AlphaLast]).