This commit is contained in:
Mitchell Marino 2024-04-01 14:09:20 -05:00
parent a256e58672
commit 6edc59ecb7

View File

@ -21,6 +21,12 @@ pub trait VanityControlData: 'static {
fn build_control<FS: FormStyle>(fs: &FS, control: ControlRenderData<FS, Self>) -> View;
}
// TODO: what if the `FS` parameter was extracted to the trait level.
// Then this would be trait object able.
// If this is trait object able, then we can store this in a list,
// and differ rendering the control until we actually need to form view.
// Which, in turn, would get rid of the Form Builder as an enum (which was
// done to avoid rendering on the server).
pub trait ControlData: 'static {
type ReturnType: Clone;