pub struct AsyncMessageDialog(/* private fields */);
Expand description
Asynchronous Message Dialog. Supported platforms:
- Windows
- macOS
- Linux (GTK only)
- WASM
Implementations§
Source§impl AsyncMessageDialog
impl AsyncMessageDialog
pub fn new() -> Self
Sourcepub fn set_level(self, level: MessageLevel) -> Self
pub fn set_level(self, level: MessageLevel) -> Self
Set level of a dialog
Depending on the system it can result in level specific icon to show up, the will inform user it message is a error, warning or just information.
Sourcepub fn set_description(self, text: impl Into<String>) -> Self
pub fn set_description(self, text: impl Into<String>) -> Self
Set description of a dialog
Description is a content of a dialog
Set the set of button that will be displayed on the dialog
Ok
dialog is a singleOk
buttonOkCancel
dialog, will display 2 buttons ok and cancel.YesNo
dialog, will display 2 buttons yes and no.YesNoCancel
dialog, will display 3 buttons: yes, no, and cancel.
Sourcepub fn set_parent<W: HasWindowHandle + HasDisplayHandle>(
self,
parent: &W,
) -> Self
pub fn set_parent<W: HasWindowHandle + HasDisplayHandle>( self, parent: &W, ) -> Self
Set parent windows explicitly (optional). Supported platforms:
- Windows
- Mac
- Linux (XDG only)
Sourcepub fn show(self) -> impl Future<Output = MessageDialogResult>
pub fn show(self) -> impl Future<Output = MessageDialogResult>
Shows a message dialog and returns the button that was pressed.
Trait Implementations§
Source§impl Clone for AsyncMessageDialog
impl Clone for AsyncMessageDialog
Source§fn clone(&self) -> AsyncMessageDialog
fn clone(&self) -> AsyncMessageDialog
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AsyncMessageDialog
impl Debug for AsyncMessageDialog
Source§impl Default for AsyncMessageDialog
impl Default for AsyncMessageDialog
Source§fn default() -> AsyncMessageDialog
fn default() -> AsyncMessageDialog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AsyncMessageDialog
impl RefUnwindSafe for AsyncMessageDialog
impl Send for AsyncMessageDialog
impl !Sync for AsyncMessageDialog
impl Unpin for AsyncMessageDialog
impl UnwindSafe for AsyncMessageDialog
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.