#[non_exhaustive]pub struct RenderOutput {
pub buffer_id: BufferId,
pub spans: Vec<Vec<(usize, usize, StyleSpec)>>,
pub signs: Vec<DiagSign>,
pub key: (u64, usize, usize),
pub perf: PerfBreakdown,
}Expand description
Per-frame output of the syntax pipeline.
Contains the styled span table (one inner Vec per document row) and the
diagnostic signs for the gutter.
§Examples
use hjkl_syntax::{RenderOutput, PerfBreakdown};
let out = RenderOutput::new(0, Vec::new(), Vec::new(), (0, 0, 0), PerfBreakdown::default());
assert_eq!(out.buffer_id, 0);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.buffer_id: BufferIdRoutes spans/signs back to the matching buffer slot.
spans: Vec<Vec<(usize, usize, StyleSpec)>>Per-row span table.
signs: Vec<DiagSign>Diagnostic signs for the gutter.
key: (u64, usize, usize)(dirty_gen, viewport_top, viewport_height) cache key.
perf: PerfBreakdownSub-step timing breakdown (zeroed in fully-sync path).
Implementations§
Source§impl RenderOutput
impl RenderOutput
Sourcepub fn new(
buffer_id: BufferId,
spans: Vec<Vec<(usize, usize, StyleSpec)>>,
signs: Vec<DiagSign>,
key: (u64, usize, usize),
perf: PerfBreakdown,
) -> Self
pub fn new( buffer_id: BufferId, spans: Vec<Vec<(usize, usize, StyleSpec)>>, signs: Vec<DiagSign>, key: (u64, usize, usize), perf: PerfBreakdown, ) -> Self
Construct a new RenderOutput.
§Examples
use hjkl_syntax::{RenderOutput, PerfBreakdown};
let out = RenderOutput::new(1, Vec::new(), Vec::new(), (7, 0, 30), PerfBreakdown::new());
assert_eq!(out.buffer_id, 1);Trait Implementations§
Source§impl Clone for RenderOutput
impl Clone for RenderOutput
Source§fn clone(&self) -> RenderOutput
fn clone(&self) -> RenderOutput
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 RenderOutput
impl Debug for RenderOutput
Source§impl PartialEq for RenderOutput
impl PartialEq for RenderOutput
Auto Trait Implementations§
impl Freeze for RenderOutput
impl RefUnwindSafe for RenderOutput
impl Send for RenderOutput
impl Sync for RenderOutput
impl Unpin for RenderOutput
impl UnsafeUnpin for RenderOutput
impl UnwindSafe for RenderOutput
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