pub struct PullToRefreshState { /* private fields */ }Expand description
Retained gesture and indicator state. The application owns refreshing.
Implementations§
Source§impl PullToRefreshState
impl PullToRefreshState
pub fn new() -> PullToRefreshState
Sourcepub fn scroll_handle(&self) -> ScrollHandle
pub fn scroll_handle(&self) -> ScrollHandle
The scroll handle used when the container owns its viewport.
Sourcepub fn distance_fraction(&self) -> f32
pub fn distance_fraction(&self) -> f32
Zero is hidden and one is the refresh threshold. Pull overshoot can exceed one.
pub fn is_animating(&self) -> bool
pub fn is_refresh_pending(&self) -> bool
Sourcepub fn snap_to(
&mut self,
fraction: f32,
cx: &mut Context<'_, PullToRefreshState>,
)
pub fn snap_to( &mut self, fraction: f32, cx: &mut Context<'_, PullToRefreshState>, )
Sets the displayed distance immediately and cancels an active gesture.
pub fn animate_to_threshold(&mut self, cx: &mut Context<'_, PullToRefreshState>)
Sourcepub fn reset(&mut self, cx: &mut Context<'_, PullToRefreshState>)
pub fn reset(&mut self, cx: &mut Context<'_, PullToRefreshState>)
Clears the current pull and any unanswered request, keeping the controlled busy value.
Sourcepub fn reject_refresh(&mut self, cx: &mut Context<'_, PullToRefreshState>)
pub fn reject_refresh(&mut self, cx: &mut Context<'_, PullToRefreshState>)
Rearms refresh after the owner declines a pending request.
Trait Implementations§
Source§impl Default for PullToRefreshState
impl Default for PullToRefreshState
Source§fn default() -> PullToRefreshState
fn default() -> PullToRefreshState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PullToRefreshState
impl !Send for PullToRefreshState
impl !Sync for PullToRefreshState
impl !UnwindSafe for PullToRefreshState
impl Forget for PullToRefreshState
impl Freeze for PullToRefreshState
impl Move for PullToRefreshState
impl Unpin for PullToRefreshState
impl UnsafeUnpin for PullToRefreshState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().