pub struct OwnedCell {
pub layer: u8,
pub pos: Pos,
pub tile: Tile,
pub grapheme: Option<String>,
pub tint: Tint,
}Expand description
An owned copy of a single DrawCell, the shape FrameRecorder
buffers instead of the borrowed original.
DrawCell borrows its grapheme text from the source Grid, so
a capture that outlives one draw_layers call (every capture source in this crate) must copy
it out immediately rather than defer to export time, when the grid it borrowed from has
already moved on to the next frame. grapheme is the one field that costs an allocation here;
everything else (Tile, Pos, layer, Tint) is already Copy.
Fields§
§layer: u8See DrawCell::layer.
pos: PosSee DrawCell::pos.
tile: TileSee DrawCell::tile.
grapheme: Option<String>See DrawCell::grapheme. Copied to an owned String (rather than something
reference-counted) since DrawCell exposes only a borrowed &str, not the Arc<str>
backends like Headless keep internally, so there
is no cheaper handle available across the Output trait boundary to share instead.
tint: TintSee DrawCell::tint.
Trait Implementations§
impl Eq for OwnedCell
impl StructuralPartialEq for OwnedCell
Auto Trait Implementations§
impl Freeze for OwnedCell
impl RefUnwindSafe for OwnedCell
impl Send for OwnedCell
impl Sync for OwnedCell
impl Unpin for OwnedCell
impl UnsafeUnpin for OwnedCell
impl UnwindSafe for OwnedCell
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.