pub struct Confirm { /* private fields */ }Expand description
A confirm dialog: title and message, optionally the two button labels, and whether the
confirming action is destructive (danger colour on Android and web, .destructive on iOS).
Unset labels keep the shell defaults (OK / Cancel).
Implementations§
Source§impl Confirm
impl Confirm
pub fn new(title: impl Into<String>, message: impl Into<String>) -> Self
Sourcepub fn confirm_label(self, label: impl Into<String>) -> Self
pub fn confirm_label(self, label: impl Into<String>) -> Self
The confirming button — name the action (“Cancel booking”), not “OK”.
Sourcepub fn cancel_label(self, label: impl Into<String>) -> Self
pub fn cancel_label(self, label: impl Into<String>) -> Self
The dismissing button — the way out (“Keep it”).
Sourcepub fn destructive(self) -> Self
pub fn destructive(self) -> Self
The confirming action destroys something: the shells draw it in the danger style.
Trait Implementations§
impl StructuralPartialEq for Confirm
Auto Trait Implementations§
impl Freeze for Confirm
impl RefUnwindSafe for Confirm
impl Send for Confirm
impl Sync for Confirm
impl Unpin for Confirm
impl UnsafeUnpin for Confirm
impl UnwindSafe for Confirm
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