pub struct TreeMoves {
pub can_move: Rc<dyn Fn(u64, Option<u64>, Option<usize>) -> MoveVerdict>,
pub move_node: Rc<dyn Fn(u64, Option<u64>, Option<usize>)>,
}Expand description
The synchronous drag half of TreeSource (docs/tree.md). Both closures follow
bind_row’s discipline: called on the UI thread from inside native drag callbacks.
Fields§
§can_move: Rc<dyn Fn(u64, Option<u64>, Option<usize>) -> MoveVerdict>The live verdict, consulted while the drag is over a target: may token land under
parent at index? index: None means “dropped onto the parent” (append). Pure, since
it runs inside the platform’s drag-validate callback.
move_node: Rc<dyn Fn(u64, Option<u64>, Option<usize>)>Commit an accepted drop. Defers the app’s on_move through the event queue
(Event::TreeMove); the app’s own data write drives the reload.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TreeMoves
impl !Send for TreeMoves
impl !Sync for TreeMoves
impl !UnwindSafe for TreeMoves
impl Freeze for TreeMoves
impl Unpin for TreeMoves
impl UnsafeUnpin for TreeMoves
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