pub struct ReorderMotion { /* private fields */ }Expand description
Keeps the presented position of each item while the caller changes slot order.
Implementations§
Source§impl ReorderMotion
impl ReorderMotion
pub fn clear(&mut self)
Sourcepub fn layout(
&mut self,
frame: &mut Frame<'_>,
viewport: Rect,
duration: f64,
items: impl IntoIterator<Item = (u64, Rect)>,
) -> Vec<Rect>
pub fn layout( &mut self, frame: &mut Frame<'_>, viewport: Rect, duration: f64, items: impl IntoIterator<Item = (u64, Rect)>, ) -> Vec<Rect>
Return presented bounds in destination order. Keys must be stable and unique. Supply bounds and viewport in unscrolled content coordinates. The caller owns drag tracking, slot choice, clipping and item rendering.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ReorderMotion
impl Freeze for ReorderMotion
impl Move for ReorderMotion
impl RefUnwindSafe for ReorderMotion
impl Send for ReorderMotion
impl Sync for ReorderMotion
impl Unpin for ReorderMotion
impl UnsafeUnpin for ReorderMotion
impl UnwindSafe for ReorderMotion
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