[][src]Trait scf_core::property::RawPropertyConfig

pub trait RawPropertyConfig: Key + Send + Sync {
    fn get_raw_key(&self) -> Box<dyn Key>;
fn get_value_type(&self) -> TypeId;
fn get_raw_default_value(&self) -> Option<Box<dyn Value>>;
fn get_value_converters(&self) -> &[Box<dyn RawTypeConverter>];
fn get_value_filter(&self) -> Option<&dyn RawValueFilter>;
fn get_doc(&self) -> Option<&str>;
fn is_static(&self) -> bool;
fn is_required(&self) -> bool;
fn clone_boxed(&self) -> Box<dyn RawPropertyConfig>;
fn to_boxed(self) -> Box<dyn RawPropertyConfig>;
fn as_trait_ref(&self) -> &dyn RawPropertyConfig;
fn as_trait_mut(&mut self) -> &mut dyn RawPropertyConfig; }

Required methods

fn get_raw_key(&self) -> Box<dyn Key>

a unique key in a configuration manager to identify a unique property,

fn get_value_type(&self) -> TypeId

type of the property value,

fn get_raw_default_value(&self) -> Option<Box<dyn Value>>

default value of the property

default to None

fn get_value_converters(&self) -> &[Box<dyn RawTypeConverter>]

type converters used to convert values of different types, for example, some configuration source has string value, but integer is needed, so it's necessary to provide a string-to-int converter

default to empty Vec

fn get_value_filter(&self) -> Option<&dyn RawValueFilter>

a chance for the user to check the value before using a property value provided by a configuration source, filter input is non-null, if output is null, the value will be ignored, if output is non-None, output will be used as the property value

default to None

fn get_doc(&self) -> Option<&str>

get property description document default to None

fn is_static(&self) -> bool

whether the property is static (not dynamically changeable)

default to false

fn is_required(&self) -> bool

whether the property is required (must be configured or have a default value)

default to false

fn clone_boxed(&self) -> Box<dyn RawPropertyConfig>

fn to_boxed(self) -> Box<dyn RawPropertyConfig>

fn as_trait_ref(&self) -> &dyn RawPropertyConfig

fn as_trait_mut(&mut self) -> &mut dyn RawPropertyConfig

Loading content...

Implementors

impl RawPropertyConfig for DefaultRawPropertyConfig[src]

impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> RawPropertyConfig for DefaultPropertyConfig<K, V>[src]

Loading content...