Skip to main content

FormSchema

Trait FormSchema 

Source
pub trait FormSchema {
    type Schema: Schema<Input = Self, Output = Self> + DynSchema;

    // Required method
    fn form_schema() -> Self::Schema;
}
Expand description

Connects a Rust struct to its companion schema.

Hand-written impls are supported for types that predate the derive; nested form fields additionally require FormBridge on the field’s type (the generated typed parse bridges through it).

Required Associated Types§

Source

type Schema: Schema<Input = Self, Output = Self> + DynSchema

The companion schema type generated by the derive.

Required Methods§

Source

fn form_schema() -> Self::Schema

Builds the companion schema.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§