Trait EguiValidationReport

Source
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§

Source

type FieldPath<'a>: Clone

The type used to identify fields.

Source

type Errors

The type of the errors.

Required Methods§

Source

fn get_field_error( &self, field: Self::FieldPath<'_>, ) -> Option<Cow<'static, str>>

Returns the error message for a field.

Source

fn has_errors(&self) -> bool

Returns true if there are any errors.

Source

fn error_count(&self) -> usize

Returns the number of errors.

Source

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.

Implementors§