pub trait AnySettingField {
// Required methods
fn as_any(&self) -> &dyn Any;
fn type_name(&self) -> &'static str;
fn type_id(&self) -> TypeId;
fn field_type(&self) -> &SettingFieldType;
fn style(&self) -> &StyleRefinement;
fn is_resettable(&self, cx: &App) -> bool;
fn reset(&self, window: &mut Window, cx: &mut App);
}Expand description
A trait for setting fields that allows for dynamic typing.
Required Methods§
fn as_any(&self) -> &dyn Any
fn type_name(&self) -> &'static str
fn type_id(&self) -> TypeId
fn field_type(&self) -> &SettingFieldType
fn style(&self) -> &StyleRefinement
fn is_resettable(&self, cx: &App) -> bool
fn reset(&self, window: &mut Window, cx: &mut App)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".