pub struct Tween {
pub from: u64,
pub to: u64,
pub start_ms: u64,
pub duration_ms: u64,
pub easing: Easing,
}Expand description
A small tween helper for adapter-driven smooth scrolling.
This is deliberately minimal and framework-neutral:
- The adapter provides the time source (
now_ms). - The adapter applies the returned scroll offset to the real scroll container.
Fields§
§from: u64§to: u64§start_ms: u64§duration_ms: u64§easing: EasingImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tween
impl<'de> Deserialize<'de> for Tween
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Tween
impl Eq for Tween
impl StructuralPartialEq for Tween
Auto Trait Implementations§
impl Freeze for Tween
impl RefUnwindSafe for Tween
impl Send for Tween
impl Sync for Tween
impl Unpin for Tween
impl UnwindSafe for Tween
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