pub struct Confirm { /* private fields */ }Expand description
A yes/no confirmation. Resolves to true only if the confirm button is chosen.
Implementations§
Source§impl Confirm
impl Confirm
pub fn message<M>(self, m: impl IntoText<M>) -> Self
pub fn confirm_label<M>(self, label: impl IntoText<M>) -> Self
pub fn cancel_label<M>(self, label: impl IntoText<M>) -> Self
Sourcepub fn destructive(self) -> Self
pub fn destructive(self) -> Self
Style the confirm button as destructive.
pub async fn present(self) -> bool
Trait Implementations§
Source§impl IntoFuture for Confirm
impl IntoFuture 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
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