Trait ToEditorField

Source
pub trait ToEditorField {
    // Required method
    fn to_editor_field(
        default: Option<impl Into<Self>>,
        name: &'static str,
        title: &'static str,
        placeholder: Option<&'static str>,
        validator: Option<&'static str>,
        component_key: Option<&'static str>,
    ) -> EditorField
       where Self: Sized;
}
Expand description

Convert an input type into a scalar_cms::EditorField

Required Methods§

Source

fn to_editor_field( default: Option<impl Into<Self>>, name: &'static str, title: &'static str, placeholder: Option<&'static str>, validator: Option<&'static str>, component_key: Option<&'static str>, ) -> EditorField
where Self: Sized,

Implementations on Foreign Types§

Source§

impl ToEditorField for bool

Source§

fn to_editor_field( default: Option<impl Into<bool>>, name: &'static str, title: &'static str, placeholder: Option<&'static str>, validator: Option<&'static str>, component_key: Option<&'static str>, ) -> EditorField
where Self: Sized,

Source§

impl ToEditorField for f32

Source§

fn to_editor_field( default: Option<impl Into<Self>>, name: &'static str, title: &'static str, placeholder: Option<&'static str>, validator: Option<&'static str>, component_key: Option<&'static str>, ) -> EditorField
where Self: Sized,

Source§

impl ToEditorField for i32

Source§

fn to_editor_field( default: Option<impl Into<Self>>, name: &'static str, title: &'static str, placeholder: Option<&'static str>, validator: Option<&'static str>, component_key: Option<&'static str>, ) -> EditorField
where Self: Sized,

Source§

impl ToEditorField for ()

Source§

fn to_editor_field( _default: Option<impl Into<Self>>, name: &'static str, title: &'static str, placeholder: Option<&'static str>, validator: Option<&'static str>, component_key: Option<&'static str>, ) -> EditorField
where Self: Sized,

Source§

impl ToEditorField for String

Source§

fn to_editor_field( default: Option<impl Into<Self>>, name: &'static str, title: &'static str, placeholder: Option<&'static str>, validator: Option<&'static str>, component_key: Option<&'static str>, ) -> EditorField
where Self: Sized,

Source§

impl<T> ToEditorField for Option<T>

Source§

fn to_editor_field( default: Option<impl Into<Option<T>>>, name: &'static str, title: &'static str, placeholder: Option<&'static str>, validator: Option<&'static str>, component_key: Option<&'static str>, ) -> EditorField
where Self: Sized,

Source§

impl<T> ToEditorField for Vec<T>

Source§

fn to_editor_field( default: Option<impl Into<Vec<T>>>, name: &'static str, title: &'static str, placeholder: Option<&'static str>, validator: Option<&'static str>, component_key: Option<&'static str>, ) -> EditorField
where Self: Sized,

Implementors§