pub trait WidgetInput:
Sized
+ Send
+ Sync
+ 'static {
// Required method
fn render_input(ui: &mut Ui<'_>, label: &str) -> Self;
}Expand description
Trait for types that can be automatically rendered as an input widget.
Required Methods§
Sourcefn render_input(ui: &mut Ui<'_>, label: &str) -> Self
fn render_input(ui: &mut Ui<'_>, label: &str) -> Self
Render this type’s input widget and return the current value.
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.
Implementations on Foreign Types§
Source§impl WidgetInput for bool
impl WidgetInput for bool
fn render_input(ui: &mut Ui<'_>, label: &str) -> Self
Source§impl WidgetInput for f32
impl WidgetInput for f32
Source§fn render_input(ui: &mut Ui<'_>, label: &str) -> Self
fn render_input(ui: &mut Ui<'_>, label: &str) -> Self
Renders as number_input returning f64, then converts to f32.
Minor precision loss is possible for values beyond f32 range.