From 6edc59ecb72d757da1f0647246c7cbf51f4589df Mon Sep 17 00:00:00 2001 From: Mitchell Marino Date: Mon, 1 Apr 2024 14:09:20 -0500 Subject: [PATCH] idea --- src/controls/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/controls/mod.rs b/src/controls/mod.rs index f8bba51..d65e289 100644 --- a/src/controls/mod.rs +++ b/src/controls/mod.rs @@ -21,6 +21,12 @@ pub trait VanityControlData: 'static { fn build_control(fs: &FS, control: ControlRenderData) -> 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;