toast

Struct ToastBuilder

source
pub struct ToastBuilder<'a, 'b> { /* private fields */ }
Expand description

The main builder class for creating a dialog window.

Implementations§

source§

impl<'a, 'b> ToastBuilder<'a, 'b>

source

pub fn info() -> Self

Create an info toast builder

source

pub fn warning() -> Self

Creates a warning toast builder

source

pub fn error() -> Self

Creates an error toast builder

source

pub fn question() -> Self

Creates a question toast builder

source

pub fn message_cstr(self, message: &'b CStr) -> Self

Sets the message string to display to the user.

§Parameters
  • message - the message CStr` to display.
source

pub fn title_cstr(self, title: &'a CStr) -> Self

Sets the title string to display to the user.

§Parameters
  • title - the title CStr` to use.
source

pub fn buttons(self, buttons: Buttons) -> Self

Sets the button style to display to the user.

§Parameters
  • buttons - the buttons to display to the user.
source

pub fn show(self) -> Selection

Show the window

Auto Trait Implementations§

§

impl<'a, 'b> Freeze for ToastBuilder<'a, 'b>

§

impl<'a, 'b> RefUnwindSafe for ToastBuilder<'a, 'b>

§

impl<'a, 'b> Send for ToastBuilder<'a, 'b>

§

impl<'a, 'b> Sync for ToastBuilder<'a, 'b>

§

impl<'a, 'b> Unpin for ToastBuilder<'a, 'b>

§

impl<'a, 'b> UnwindSafe for ToastBuilder<'a, 'b>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.