pub struct ScrollState { /* private fields */ }Expand description
Scroll offsets for every panel that has one.
Implementations§
Source§impl ScrollState
impl ScrollState
Sourcepub const fn follows_the_end(panel: Panel) -> bool
pub const fn follows_the_end(panel: Panel) -> bool
Panels that keep showing their end as new rows arrive.
Sourcepub const fn is_scrollable(panel: Panel) -> bool
pub const fn is_scrollable(panel: Panel) -> bool
Whether a panel scrolls through this state at all.
Sourcepub fn fit(&mut self, panel: Panel, content: usize, viewport: usize)
pub fn fit(&mut self, panel: Panel, content: usize, viewport: usize)
Records the room a panel has and the content it holds, clamping it.
Sourcepub fn scroll_by(&mut self, panel: Panel, rows: isize)
pub fn scroll_by(&mut self, panel: Panel, rows: isize)
Scrolls by rows, downwards when positive.
Sourcepub fn page(&mut self, panel: Panel, forward: bool)
pub fn page(&mut self, panel: Panel, forward: bool)
Scrolls by one screenful, downwards when forward.
Trait Implementations§
Source§impl Clone for ScrollState
impl Clone for ScrollState
Source§impl Debug for ScrollState
impl Debug for ScrollState
Auto Trait Implementations§
impl Freeze for ScrollState
impl RefUnwindSafe for ScrollState
impl Send for ScrollState
impl Sync for ScrollState
impl Unpin for ScrollState
impl UnsafeUnpin for ScrollState
impl UnwindSafe for ScrollState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more