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>) -> Confirm
pub fn confirm_label<M>(self, label: impl IntoText<M>) -> Confirm
pub fn cancel_label<M>(self, label: impl IntoText<M>) -> Confirm
Sourcepub fn destructive(self) -> Confirm
pub fn destructive(self) -> Confirm
Style the confirm button as destructive.
pub async fn present(self) -> bool
Trait Implementations§
Source§impl IntoFuture for Confirm
impl IntoFuture for Confirm
Source§type IntoFuture = Pin<Box<dyn Future<Output = bool>>>
type IntoFuture = Pin<Box<dyn Future<Output = bool>>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> <Confirm as IntoFuture>::IntoFuture
fn into_future(self) -> <Confirm as IntoFuture>::IntoFuture
Creates a future from a value. Read more
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