Skip to main content

SettingType

Trait SettingType 

Source
pub trait SettingType: Copy {
    // Required methods
    fn from_value(v: SettingValue) -> Self;
    fn to_value(self) -> SettingValue;
    fn try_parse(s: &str) -> Option<Self>;
}
Expand description

Trait for types that can be stored in Settings. Provides conversion to/from the internal SettingValue representation.

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SettingType for f64

Source§

impl SettingType for i64

Source§

impl SettingType for u64

Implementors§