pub struct SwipeAction { /* private fields */ }Expand description
One button in a row’s swipe-action offer (docs/list.md): what the platform reveals as the
user drags a row aside, built by swipe_action. Holds the label, the styling hints the
backend maps onto its own affordance, and the handler the activation runs.
Implementations§
Source§impl SwipeAction
impl SwipeAction
Sourcepub fn destructive(self) -> Self
pub fn destructive(self) -> Self
Mark the action destructive: the platform styles it as such (red, on the Apple toolkits) and may animate the row away on activation.
Sourcepub fn tint(self, color: Color) -> Self
pub fn tint(self, color: Color) -> Self
The button’s background color, where the platform honors one. Left unset, the platform picks its own default (gray, with red for destructive actions, on the Apple toolkits).
Auto Trait Implementations§
impl !RefUnwindSafe for SwipeAction
impl !Send for SwipeAction
impl !Sync for SwipeAction
impl !UnwindSafe for SwipeAction
impl Freeze for SwipeAction
impl Unpin for SwipeAction
impl UnsafeUnpin for SwipeAction
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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