Skip to main content

ScrollPhysicsBase

Struct ScrollPhysicsBase 

Source
pub struct ScrollPhysicsBase;
Expand description

The bodies of Dart’s ScrollPhysics base class: what super.foo(..) calls.

A trait default cannot be reached from an implementor that overrides it, so these are associated functions on a namespace rather than a second trait: a second trait carrying Dart’s method names would make every physics.foo() call ambiguous.

Implementations§

Source§

impl ScrollPhysicsBase

Source

pub fn build_parent<P: ScrollPhysics + ?Sized>( physics: &P, ancestor: Option<ScrollPhysicsRef>, ) -> Option<ScrollPhysicsRef>

If parent is null then return ancestor, otherwise recursively build a ScrollPhysics that has ancestor as its parent.

This function is typically used to define apply_to.

Source

pub fn apply_to<P: ScrollPhysics + ?Sized>( physics: &P, ancestor: Option<ScrollPhysicsRef>, ) -> ScrollPhysicsRef

Source

pub fn apply_physics_to_user_offset<P: ScrollPhysics + ?Sized>( physics: &P, position: &dyn ScrollMetrics, offset: f64, ) -> f64

Source

pub fn should_accept_user_offset<P: ScrollPhysics + ?Sized>( physics: &P, position: &dyn ScrollMetrics, ) -> bool

Source

pub fn recommend_deferred_loading<P: ScrollPhysics + ?Sized>( physics: &P, app: &mut App, velocity: f64, metrics: &dyn ScrollMetrics, context: BuildContext, ) -> bool

Source

pub fn apply_boundary_conditions<P: ScrollPhysics + ?Sized>( physics: &P, position: &dyn ScrollMetrics, value: f64, ) -> f64

Source

pub fn adjust_position_for_new_dimensions<P: ScrollPhysics + ?Sized>( physics: &P, old_position: &dyn ScrollMetrics, new_position: &dyn ScrollMetrics, is_scrolling: bool, velocity: f64, ) -> f64

Source

pub fn create_ballistic_simulation<P: ScrollPhysics + ?Sized>( physics: &P, position: &dyn ScrollMetrics, velocity: f64, ) -> Option<Box<dyn Simulation>>

Source

pub fn spring<P: ScrollPhysics + ?Sized>(physics: &P) -> SpringDescription

Source

pub fn tolerance_for<P: ScrollPhysics + ?Sized>( physics: &P, metrics: &dyn ScrollMetrics, ) -> Tolerance

Source

pub fn min_fling_distance<P: ScrollPhysics + ?Sized>(physics: &P) -> f64

Source

pub fn min_fling_velocity<P: ScrollPhysics + ?Sized>(physics: &P) -> f64

Source

pub fn max_fling_velocity<P: ScrollPhysics + ?Sized>(physics: &P) -> f64

Source

pub fn carried_momentum<P: ScrollPhysics + ?Sized>( physics: &P, existing_velocity: f64, ) -> f64

Source

pub fn drag_start_distance_motion_threshold<P: ScrollPhysics + ?Sized>( physics: &P, ) -> Option<f64>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,