pub trait EguiValidationReport {
type FieldPath<'a>: Clone;
type Errors;
// Required methods
fn get_field_error(
&self,
field: Self::FieldPath<'_>,
) -> Option<Cow<'static, str>>;
fn has_errors(&self) -> bool;
fn error_count(&self) -> usize;
fn get_errors(&self) -> Option<&Self::Errors>;
}
Expand description
A trait telling egui_form
how to parse validation errors.
Required Associated Types§
Required Methods§
Sourcefn get_field_error(
&self,
field: Self::FieldPath<'_>,
) -> Option<Cow<'static, str>>
fn get_field_error( &self, field: Self::FieldPath<'_>, ) -> Option<Cow<'static, str>>
Returns the error message for a field.
Sourcefn has_errors(&self) -> bool
fn has_errors(&self) -> bool
Returns true if there are any errors.
Sourcefn error_count(&self) -> usize
fn error_count(&self) -> usize
Returns the number of errors.
Sourcefn get_errors(&self) -> Option<&Self::Errors>
fn get_errors(&self) -> Option<&Self::Errors>
Returns a reference to the errors.
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.