pub struct ScrollState {
pub offset: usize,
pub window_height: usize,
/* private fields */
}Fields§
§offset: usize§window_height: usizeImplementations§
Source§impl ScrollState
impl ScrollState
pub fn new() -> Self
pub fn update_dimensions(&mut self, window_height: usize, content_height: usize)
pub fn scroll_up(&mut self, amount: usize)
pub fn scroll_down(&mut self, amount: usize)
pub fn force_auto_scroll(&mut self)
pub fn get_visible_range(&self) -> (usize, usize)
pub fn can_scroll(&self) -> bool
pub fn is_auto_scroll(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScrollState
impl RefUnwindSafe for ScrollState
impl Send for ScrollState
impl Sync for ScrollState
impl Unpin 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> 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