Trait InvalidFieldErr

Source
pub trait InvalidFieldErr {
    // Required method
    fn invalid_field(
        context: &'static str,
        field: &'static str,
        reason: &'static str,
    ) -> Self;
}
Expand description

Trait for creating “invalid field” errors.

Required Methods§

Source

fn invalid_field( context: &'static str, field: &'static str, reason: &'static str, ) -> Self

Creates a new “invalid field” error.

§Arguments
  • context - The context in which the error occurred.
  • field - The name of the invalid field.
  • reason - The reason why the field is invalid.
§Returns

A new error instance.

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§