Expand description
Represents an action that can be displayed when a user swipes-to-reveal on a ListViewRow. You return this from the appropriate delegate method, and the system will handle displaying the necessary pieces for you.
Tuple Fields
0: Id<Object>
Implementations
sourceimpl RowAction
impl RowAction
sourcepub fn new<F>(title: &str, style: RowActionStyle, handler: F) -> Self where
F: Fn(RowAction, usize) + 'static,
pub fn new<F>(title: &str, style: RowActionStyle, handler: F) -> Self where
F: Fn(RowAction, usize) + 'static,
Creates and returns a new RowAction
. You’d use this handler to
configure whatever action you want to show when a user swipes-to-reveal
on your ListViewRow.
Additional configuration can be done after initialization, if need be.
These run on the main thread, as they’re UI handlers - so we can avoid Send + Sync on our definitions.
sourcepub fn set_background_color<C: AsRef<Color>>(&mut self, color: C)
pub fn set_background_color<C: AsRef<Color>>(&mut self, color: C)
Sets the background color of this action.
sourcepub fn set_style(&mut self, style: RowActionStyle)
pub fn set_style(&mut self, style: RowActionStyle)
Sets the style of this action.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RowAction
impl Send for RowAction
impl Sync for RowAction
impl Unpin for RowAction
impl UnwindSafe for RowAction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more