[][src]Struct yew::services::DialogService

pub struct DialogService {}

A dialog service.

Implementations

impl DialogService[src]

pub fn alert(message: &str)[src]

Calls alert function.

pub fn confirm(message: &str) -> bool[src]

Calls confirm function.

pub fn prompt(message: &str, default: Option<&str>) -> Option<String>[src]

Prompts the user to input a message. In most browsers this will open an alert box with an input field where the user can input a message. A default value can be supplied which will be returned if the user doesn't input anything.

MDN Documentation

This method will panic! if there is an error in the process of trying to carry out this operation.

Note that this function is blocking; no other code can be run on the thread while the user inputs their message which means that the page will appear to have 'frozen' while the user types in their message.

This function will return None if the value of default is None and the user cancels the operation. (normally a 'cancel' button will be displayed to the user, clicking which cancels the operation).

Trait Implementations

impl Debug for DialogService[src]

impl Default for DialogService[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.