pub struct Rendered {
pub lines: Vec<String>,
pub cursor: Option<(usize, usize)>,
pub images: Vec<ImageCommand>,
}Expand description
The output of a component’s render call.
Contains the text lines to display, an optional cursor position, and any terminal image commands that should be emitted.
Fields§
§lines: Vec<String>Lines of text, each guaranteed to fit within the requested width.
cursor: Option<(usize, usize)>Optional cursor position as (row, col) in screen coordinates.
images: Vec<ImageCommand>Terminal image commands (Kitty / iTerm2 protocols) to emit.
Implementations§
Source§impl Rendered
impl Rendered
Sourcepub fn blit_onto(&self, target: &mut Rendered, row: u16, col: u16)
pub fn blit_onto(&self, target: &mut Rendered, row: u16, col: u16)
Composite this rendered content onto a target at the given offset.
Lines are overwritten starting at row / col. The cursor and image
commands are translated and appended to the target.
Sourcepub fn blit_into_rect(&self, target: &mut Rendered, rect: Rect)
pub fn blit_into_rect(&self, target: &mut Rendered, rect: Rect)
Composite this rendered content into a target at the given rect.
Lines are clipped to rect.height. Each line is inserted at rect.x
and truncated to rect.width. The cursor and images are translated.
Trait Implementations§
impl StructuralPartialEq for Rendered
Auto Trait Implementations§
impl Freeze for Rendered
impl RefUnwindSafe for Rendered
impl Send for Rendered
impl Sync for Rendered
impl Unpin for Rendered
impl UnsafeUnpin for Rendered
impl UnwindSafe for Rendered
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