Property

Trait Property 

Source
pub trait Property<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint>: RawProperty {
    // Required methods
    fn get_config(&self) -> &dyn PropertyConfig<K, V>;
    fn get_value(&self) -> Option<Box<V>>;
    fn add_change_listener(&self, listener: PropertyChangeListener<K, V>);
    fn clone_boxed(&self) -> Box<dyn Property<K, V>>;
    fn to_boxed(self) -> Box<dyn Property<K, V>>;
}

Required Methods§

Source

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

Source

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

property value, if not configured or no valid value, default to defaultValue Of PropertyConfig

Source

fn add_change_listener(&self, listener: PropertyChangeListener<K, V>)

listeners to the value change, notified once value changed

Source

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

Source

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

Trait Implementations§

Source§

impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> Clone for Box<dyn Property<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> PartialEq for Box<dyn Property<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.

Implementors§