pub enum Action {
None,
Swap(usize),
Remove(usize),
}
Expand description
An action for ordered lists in UI.
§Examples
use arc_util::ui::action::Action;
let mut vec = vec!["a", "b", "c"];
let mut action = Action::new();
for (i, entry) in vec.iter().enumerate() {
ui.text(entry);
ui.same_line();
action.render_buttons(ui, "buttons-id", i, vec.len());
}
action.perform(&mut vec);
Variants§
None
No action to be performed.
Swap(usize)
Swap index with next element.
Remove(usize)
Delete index.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnwindSafe for Action
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