pub struct ViewportState {
pub width: usize,
pub height: Option<usize>,
pub scroll_top: usize,
pub visible_lines: Range<usize>,
}Expand description
Viewport state
Fields§
§width: usizeViewport width (in character cells)
height: Option<usize>Viewport height (line count, determined by the frontend)
scroll_top: usizeCurrent scroll position (visual line number)
visible_lines: Range<usize>Visible visual line range
Trait Implementations§
Source§impl Clone for ViewportState
impl Clone for ViewportState
Source§fn clone(&self) -> ViewportState
fn clone(&self) -> ViewportState
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 moreAuto Trait Implementations§
impl Freeze for ViewportState
impl RefUnwindSafe for ViewportState
impl Send for ViewportState
impl Sync for ViewportState
impl Unpin for ViewportState
impl UnwindSafe for ViewportState
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