pub struct RenderedGrid {
pub lines: Vec<String>,
pub spans: Vec<Vec<GridSpan>>,
}Expand description
The laid-out popup: lines to write, and where the keys are.
The spans come from the LAYOUT rather than from re-scanning the
rendered text, and that is the point: this function knows the byte
offset it wrote each key at, while a scanner would have to guess
which run of a padded row was a key. magit/highlight.rs carries a
note about exactly that hazard — a refs row cannot be scanned back
unambiguously, so its producer emits spans directly. Same rule here,
applied before the ambiguity can arise.
Fields§
§lines: Vec<String>The popup’s text, one entry per line: header, grid rows, then any footer lines. Written into the popup buffer verbatim.
spans: Vec<Vec<GridSpan>>One entry per line in lines, same order. Empty vectors for
lines with nothing to emphasise.
Implementations§
Trait Implementations§
Source§impl Clone for RenderedGrid
impl Clone for RenderedGrid
Source§fn clone(&self) -> RenderedGrid
fn clone(&self) -> RenderedGrid
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RenderedGrid
impl Debug for RenderedGrid
Source§impl Default for RenderedGrid
impl Default for RenderedGrid
Source§fn default() -> RenderedGrid
fn default() -> RenderedGrid
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RenderedGrid
impl RefUnwindSafe for RenderedGrid
impl Send for RenderedGrid
impl Sync for RenderedGrid
impl Unpin for RenderedGrid
impl UnsafeUnpin for RenderedGrid
impl UnwindSafe for RenderedGrid
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