ToastRenderer

Trait ToastRenderer 

Source
pub trait ToastRenderer {
    // Required methods
    fn description(&mut self, description: Element) -> &mut Self;
    fn color(&mut self, color: Color) -> &mut Self;
    fn title(&mut self, title: impl ToString) -> &mut Self;
    fn duration_in_ms(&mut self, duration: u32) -> &mut Self;
    fn animation(&mut self, animation: Animation) -> &mut Self;
    fn is_closable(&mut self, is_closable: bool) -> &mut Self;
    fn success(&mut self, description: impl ToString);
    fn error(&mut self, description: impl ToString);
    fn loading(&mut self, description: impl ToString);
    fn render(&mut self);
}

Required Methods§

Source

fn description(&mut self, description: Element) -> &mut Self

Source

fn color(&mut self, color: Color) -> &mut Self

Source

fn title(&mut self, title: impl ToString) -> &mut Self

Source

fn duration_in_ms(&mut self, duration: u32) -> &mut Self

Source

fn animation(&mut self, animation: Animation) -> &mut Self

Source

fn is_closable(&mut self, is_closable: bool) -> &mut Self

Source

fn success(&mut self, description: impl ToString)

Source

fn error(&mut self, description: impl ToString)

Source

fn loading(&mut self, description: impl ToString)

Source

fn render(&mut self)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToastRenderer for Signal<ToasterState>

Source§

fn success(&mut self, description: impl ToString)

Build a toast with success background color and title “Success” The string passed as argument will be the description of the Toast

Source§

fn error(&mut self, description: impl ToString)

Build a toast with destructive background color and title “Error” The string passed as argument will be the description of the Toast

Source§

fn loading(&mut self, description: impl ToString)

Build a toast with primary background color and title “Loading” The string passed as argument will be the description of the Toast

Source§

fn description(&mut self, description: Element) -> &mut Self

Source§

fn color(&mut self, color: Color) -> &mut Self

Source§

fn title(&mut self, title: impl ToString) -> &mut Self

Source§

fn duration_in_ms(&mut self, duration: u32) -> &mut Self

Source§

fn animation(&mut self, animation: Animation) -> &mut Self

Source§

fn is_closable(&mut self, is_closable: bool) -> &mut Self

Source§

fn render(&mut self)

Implementors§