pub struct ScrollViewState { /* private fields */ }Implementations§
Source§impl ScrollViewState
impl ScrollViewState
Sourcepub fn with_offset(offset: Position) -> Self
pub fn with_offset(offset: Position) -> Self
创建一个带有指定偏移量的新滚动视图状态
Sourcepub const fn set_offset(&mut self, offset: Position)
pub const fn set_offset(&mut self, offset: Position)
设置滚动视图状态的偏移量
Sourcepub const fn scroll_down(&mut self)
pub const fn scroll_down(&mut self)
向下滚动一行
Sourcepub fn scroll_page_down(&mut self)
pub fn scroll_page_down(&mut self)
向下滚动一页
Sourcepub fn scroll_page_up(&mut self)
pub fn scroll_page_up(&mut self)
向上滚动一页
Sourcepub const fn scroll_left(&mut self)
pub const fn scroll_left(&mut self)
向左滚动一列
Sourcepub const fn scroll_right(&mut self)
pub const fn scroll_right(&mut self)
向右滚动一列
Sourcepub const fn scroll_to_top(&mut self)
pub const fn scroll_to_top(&mut self)
滚动到缓冲区顶部
Sourcepub fn scroll_to_bottom(&mut self)
pub fn scroll_to_bottom(&mut self)
滚动到缓冲区底部
pub fn handle_event(&mut self, event: &Event)
Trait Implementations§
Source§impl Clone for ScrollViewState
impl Clone for ScrollViewState
Source§fn clone(&self) -> ScrollViewState
fn clone(&self) -> ScrollViewState
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScrollViewState
impl Debug for ScrollViewState
Source§impl Default for ScrollViewState
impl Default for ScrollViewState
Source§fn default() -> ScrollViewState
fn default() -> ScrollViewState
Returns the “default value” for a type. Read more
Source§impl Hash for ScrollViewState
impl Hash for ScrollViewState
Source§impl PartialEq for ScrollViewState
impl PartialEq for ScrollViewState
impl Copy for ScrollViewState
impl Eq for ScrollViewState
impl StructuralPartialEq for ScrollViewState
Auto Trait Implementations§
impl Freeze for ScrollViewState
impl RefUnwindSafe for ScrollViewState
impl Send for ScrollViewState
impl Sync for ScrollViewState
impl Unpin for ScrollViewState
impl UnwindSafe for ScrollViewState
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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