Struct e_utils::dialog::AsyncMessageDialog
source · 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() -> AsyncMessageDialog
sourcepub fn set_level(self, level: MessageLevel) -> AsyncMessageDialog
pub fn set_level(self, level: MessageLevel) -> AsyncMessageDialog
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_title(self, text: impl Into<String>) -> AsyncMessageDialog
pub fn set_title(self, text: impl Into<String>) -> AsyncMessageDialog
Set title of a dialog
sourcepub fn set_description(self, text: impl Into<String>) -> AsyncMessageDialog
pub fn set_description(self, text: impl Into<String>) -> AsyncMessageDialog
Set description of a dialog
Description is a content of a dialog
Set the set of button that will be displayed on the dialog
Okdialog is a singleOkbuttonOkCanceldialog, will display 2 buttons ok and cancel.YesNodialog, will display 2 buttons yes and no.YesNoCanceldialog, will display 3 buttons: yes, no, and cancel.
sourcepub fn set_parent<W>(self, parent: &W) -> AsyncMessageDialogwhere
W: HasWindowHandle,
pub fn set_parent<W>(self, parent: &W) -> AsyncMessageDialogwhere
W: HasWindowHandle,
Set parent windows explicitly (optional)
Suported in: macos and windows
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moresource§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
source§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().