Skip to main content

PredictiveBackRoute

Trait PredictiveBackRoute 

Source
pub trait PredictiveBackRoute: Route {
    // Required methods
    fn pop_gesture_enabled(self: Handle<Self>, app: &mut App) -> bool;
    fn handle_start_back_gesture(
        self: Handle<Self>,
        app: &mut App,
        progress: f64,
    );
    fn handle_update_back_gesture_progress(
        self: Handle<Self>,
        app: &mut App,
        progress: f64,
    );
    fn handle_commit_back_gesture(self: Handle<Self>, app: &mut App);
    fn handle_cancel_back_gesture(self: Handle<Self>, app: &mut App);
}
Expand description

An interface for a route that supports predictive back gestures.

Required Methods§

Source

fn pop_gesture_enabled(self: Handle<Self>, app: &mut App) -> bool

Whether a pop gesture can be started by the user for this route.

Source

fn handle_start_back_gesture(self: Handle<Self>, app: &mut App, progress: f64)

Handles a predictive back gesture starting.

The progress parameter indicates the progress of the gesture from 0.0 to 1.0.

Source

fn handle_update_back_gesture_progress( self: Handle<Self>, app: &mut App, progress: f64, )

Handles a predictive back gesture updating as the user drags across the screen.

The progress parameter indicates the progress of the gesture from 0.0 to 1.0.

Source

fn handle_commit_back_gesture(self: Handle<Self>, app: &mut App)

Handles a predictive back gesture ending successfully.

Source

fn handle_cancel_back_gesture(self: Handle<Self>, app: &mut App)

Handles a predictive back gesture ending in cancellation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§