pub struct ListReorderDriver {
pub can_move: Box<dyn Fn(usize, usize) -> i64>,
pub moved: Box<dyn Fn(usize, usize)>,
}Expand description
The reorder closures the list() piece supplies (docs/list.md). Exposed to the backend as
day_spec::ListReorder by [make_source]; also driven directly by
list_try_reorder (the dayscript reorder step and the mock probe).
Fields§
§can_move: Box<dyn Fn(usize, usize) -> i64>Consult the app’s guard: returns the accepted target index, or -1 to deny.
moved: Box<dyn Fn(usize, usize)>Commit an accepted move: rotates the piece’s snapshot + tokens synchronously and defers
the app’s on_reorder callback to the next event drain.
Auto Trait Implementations§
impl Freeze for ListReorderDriver
impl !RefUnwindSafe for ListReorderDriver
impl !Send for ListReorderDriver
impl !Sync for ListReorderDriver
impl Unpin for ListReorderDriver
impl UnsafeUnpin for ListReorderDriver
impl !UnwindSafe for ListReorderDriver
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more