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§
Sourcefn pop_gesture_enabled(self: Handle<Self>, app: &mut App) -> bool
fn pop_gesture_enabled(self: Handle<Self>, app: &mut App) -> bool
Whether a pop gesture can be started by the user for this route.
Sourcefn handle_start_back_gesture(self: Handle<Self>, app: &mut App, progress: f64)
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.
Sourcefn handle_update_back_gesture_progress(
self: Handle<Self>,
app: &mut App,
progress: f64,
)
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.
Sourcefn handle_commit_back_gesture(self: Handle<Self>, app: &mut App)
fn handle_commit_back_gesture(self: Handle<Self>, app: &mut App)
Handles a predictive back gesture ending successfully.
Sourcefn handle_cancel_back_gesture(self: Handle<Self>, app: &mut App)
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".