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§
Sourcefn flash_success(&self)
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.
Sourcefn flash_error(&self)
fn flash_error(&self)
Begin an error flash on the widget this Response came from.
Sourcefn clear_flash(&self)
fn clear_flash(&self)
Immediately clear any flash state on the widget this Response
came from. Rarely needed — flashes clear themselves after
FLASH_DURATION.