Trait Field

Source
pub trait Field {
    // Required methods
    fn label(&self) -> &'static str;
    fn required(&self) -> bool;
    fn validate(&self) -> Option<Cow<'static, str>>;
    fn set_default(&self);
}

Required Methods§

Source

fn label(&self) -> &'static str

字段名称

Source

fn required(&self) -> bool

字段是否必须

Source

fn validate(&self) -> Option<Cow<'static, str>>

字段校验

Source

fn set_default(&self)

设置默认值

Implementors§

Source§

impl<M, T> Field for RwSignalField<M, T>
where T: Clone + Default + 'static, M: FieldMeta<Type = T>,

Source§

impl<M, T> Field for SignalField<M, T>
where T: Clone + 'static, M: FieldMeta<Type = T>,