Skip to main content

HookContextFormExt

Trait HookContextFormExt 

Source
pub trait HookContextFormExt {
    // Required method
    fn form() -> FormState;
}
Expand description

Extension trait that exposes the hook-context factory used by App::use_form.

Splitting the factory into a trait (rather than a bare impl HookContext) keeps the public surface compact and lets future hooks slot into the same trait.

Required Methods§

Source

fn form() -> FormState

Returns the FormState for the current hook context slot.

§Returns
  • FormState - A FormState value.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl HookContextFormExt for HookContext

Source§

fn form() -> FormState

Returns a fresh FormState bound to the current component scope.

§Returns
  • FormState - A FormState value.

Implementors§