pub struct ValidationErrorDisplay { /* private fields */ }Expand description
A widget for displaying inline validation errors.
Renders an error message with an icon, styled for visibility and accessibility. Supports smooth appearance/disappearance animations.
Implementations§
Source§impl ValidationErrorDisplay
impl ValidationErrorDisplay
Sourcepub fn new(message: impl Into<String>) -> Self
pub fn new(message: impl Into<String>) -> Self
Create a new validation error display with the given message.
Sourcepub fn with_code(error_code: &'static str, message: impl Into<String>) -> Self
pub fn with_code(error_code: &'static str, message: impl Into<String>) -> Self
Create from an error code and message.
Sourcepub fn with_style(self, style: Style) -> Self
pub fn with_style(self, style: Style) -> Self
Set the error text style.
Sourcepub fn with_icon_style(self, style: Style) -> Self
pub fn with_icon_style(self, style: Style) -> Self
Set the icon style.
Sourcepub fn with_animation_duration(self, duration: Duration) -> Self
pub fn with_animation_duration(self, duration: Duration) -> Self
Set the animation duration.
Sourcepub fn error_code(&self) -> Option<&'static str>
pub fn error_code(&self) -> Option<&'static str>
Get the error code, if any.
Trait Implementations§
Source§impl Clone for ValidationErrorDisplay
impl Clone for ValidationErrorDisplay
Source§fn clone(&self) -> ValidationErrorDisplay
fn clone(&self) -> ValidationErrorDisplay
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationErrorDisplay
impl Debug for ValidationErrorDisplay
Source§impl Default for ValidationErrorDisplay
impl Default for ValidationErrorDisplay
Auto Trait Implementations§
impl Freeze for ValidationErrorDisplay
impl RefUnwindSafe for ValidationErrorDisplay
impl Send for ValidationErrorDisplay
impl Sync for ValidationErrorDisplay
impl Unpin for ValidationErrorDisplay
impl UnsafeUnpin for ValidationErrorDisplay
impl UnwindSafe for ValidationErrorDisplay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more