Skip to main content

ResponseFlashExt

Trait ResponseFlashExt 

Source
pub trait ResponseFlashExt {
    // Required methods
    fn flash_success(&self);
    fn flash_error(&self);
    fn clear_flash(&self);
}
Expand description

Extension trait that lets you trigger a flash directly on an egui::Response. Import this trait (or use elegance::*) to bring the methods into scope.

Required Methods§

Source

fn flash_success(&self)

Begin a success flash on the widget this Response came from.

Call once right after a submit returns Ok. Safe to re-call — the animation restarts from the beginning.

Source

fn flash_error(&self)

Begin an error flash on the widget this Response came from.

Source

fn clear_flash(&self)

Immediately clear any flash state on the widget this Response came from. Rarely needed — flashes clear themselves after FLASH_DURATION.

Implementations on Foreign Types§

Source§

impl ResponseFlashExt for Response

Implementors§