PropertyConfig

Trait PropertyConfig 

Source
pub trait PropertyConfig<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint>: RawPropertyConfig {
    // Required methods
    fn get_key(&self) -> Box<K>;
    fn get_default_value(&self) -> Option<Box<V>>;
    fn clone_boxed(&self) -> Box<dyn PropertyConfig<K, V>>;
    fn to_boxed(self) -> Box<dyn PropertyConfig<K, V>>;
}

Required Methods§

Source

fn get_key(&self) -> Box<K>

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

Source

fn get_default_value(&self) -> Option<Box<V>>

default value of the property

default to None

Source

fn clone_boxed(&self) -> Box<dyn PropertyConfig<K, V>>

Source

fn to_boxed(self) -> Box<dyn PropertyConfig<K, V>>

Trait Implementations§

Source§

impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> Clone for Box<dyn PropertyConfig<K, V>>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> Hash for Box<dyn PropertyConfig<K, V>>

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> PartialEq for Box<dyn PropertyConfig<K, V>>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> Eq for Box<dyn PropertyConfig<K, V>>

Implementors§