pub struct ScrollbackWindow {
pub total_lines: usize,
pub max_scroll_offset: usize,
pub scroll_offset_from_bottom: usize,
pub viewport_start: usize,
pub viewport_end: usize,
pub render_start: usize,
pub render_end: usize,
}Expand description
Computed visible/render window over scrollback for virtualized rendering.
Indexes are in scrollback space (0 = oldest, total_lines = one past newest).
Fields§
§total_lines: usizeTotal lines currently stored in scrollback.
max_scroll_offset: usizeMaximum legal scroll offset from the newest viewport position.
scroll_offset_from_bottom: usizeClamped scroll offset from the newest viewport position.
viewport_start: usizeVisible viewport start (inclusive).
viewport_end: usizeVisible viewport end (exclusive).
render_start: usizeRender start including overscan (inclusive).
render_end: usizeRender end including overscan (exclusive).
Implementations§
Source§impl ScrollbackWindow
impl ScrollbackWindow
Sourcepub fn viewport_range(self) -> Range<usize>
pub fn viewport_range(self) -> Range<usize>
Visible viewport range.
Sourcepub fn render_range(self) -> Range<usize>
pub fn render_range(self) -> Range<usize>
Render range including overscan.
Sourcepub fn viewport_len(self) -> usize
pub fn viewport_len(self) -> usize
Number of visible viewport lines.
Sourcepub fn render_len(self) -> usize
pub fn render_len(self) -> usize
Number of lines in the render range (viewport + overscan).
Trait Implementations§
Source§impl Clone for ScrollbackWindow
impl Clone for ScrollbackWindow
Source§fn clone(&self) -> ScrollbackWindow
fn clone(&self) -> ScrollbackWindow
Returns a duplicate of the value. Read more
1.0.0 · 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 ScrollbackWindow
impl Debug for ScrollbackWindow
Source§impl PartialEq for ScrollbackWindow
impl PartialEq for ScrollbackWindow
impl Copy for ScrollbackWindow
impl Eq for ScrollbackWindow
impl StructuralPartialEq for ScrollbackWindow
Auto Trait Implementations§
impl Freeze for ScrollbackWindow
impl RefUnwindSafe for ScrollbackWindow
impl Send for ScrollbackWindow
impl Sync for ScrollbackWindow
impl Unpin for ScrollbackWindow
impl UnwindSafe for ScrollbackWindow
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