SettingFieldElement

Trait SettingFieldElement 

Source
pub trait SettingFieldElement {
    type Element: IntoElement + 'static;

    // Required method
    fn render_field(
        &self,
        options: &RenderOptions,
        window: &mut Window,
        cx: &mut App,
    ) -> Self::Element;
}
Expand description

A trait for rendering custom setting field elements.

For crate::setting::SettingField::element method.

Required Associated Types§

Source

type Element: IntoElement + 'static

Required Methods§

Source

fn render_field( &self, options: &RenderOptions, window: &mut Window, cx: &mut App, ) -> Self::Element

Implementations on Foreign Types§

Source§

impl SettingFieldElement for Rc<dyn SettingFieldElement<Element = AnyElement>>

Source§

type Element = AnyElement

Source§

fn render_field( &self, options: &RenderOptions, window: &mut Window, cx: &mut App, ) -> Self::Element

Implementors§

Source§

impl<F, E> SettingFieldElement for F
where E: IntoElement + 'static, F: Fn(&RenderOptions, &mut Window, &mut App) -> E,