pub struct SwipeToDismissState { /* private fields */ }Expand description
State for SwipeToDismiss - backed by a generic SwipeableState<DismissValue>.
Implementations§
Source§impl SwipeToDismissState
impl SwipeToDismissState
pub fn new() -> Self
pub fn with_config(config: SwipeToDismissConfig) -> Self
Sourcepub fn set_offset_instant(&self, off: f32)
pub fn set_offset_instant(&self, off: f32)
Snap instantly to an offset (used during active drag).
Sourcepub fn is_dismissed(&self) -> bool
pub fn is_dismissed(&self) -> bool
Whether the current position is past the dismiss threshold.
Sourcepub fn dismiss_to(&self, offset: f32)
pub fn dismiss_to(&self, offset: f32)
Animate to the dismissed position with custom offset.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SwipeToDismissState
impl !Send for SwipeToDismissState
impl !Sync for SwipeToDismissState
impl !UnwindSafe for SwipeToDismissState
impl Freeze for SwipeToDismissState
impl Unpin for SwipeToDismissState
impl UnsafeUnpin for SwipeToDismissState
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