Skip to main content

FormControl

Trait FormControl 

pub trait FormControl: Sized + Widget {
    // Required method
    fn with_form_accessible_name(self, name: &str) -> Self;
}
Expand description

A control that can receive the accessible name of a visible form label.

Implemented by the toolkit’s standard text, choice, numeric, date, time, colour, checkbox, toggle, and slider controls. Application-defined composite controls can implement this trait to participate in labeled_field without changing their widget tree.

Required Methods§

fn with_form_accessible_name(self, name: &str) -> Self

Attach the same localization key rendered by the field’s visible label.

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§