pub struct DefaultProperty<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> { /* private fields */ }
Implementations§
Source§impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> DefaultProperty<K, V>
impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> DefaultProperty<K, V>
pub fn from_raw(property: &dyn RawProperty) -> Self
Trait Implementations§
Source§impl<K: Clone + ?Sized + KeyConstraint, V: Clone + ?Sized + ValueConstraint> Clone for DefaultProperty<K, V>
impl<K: Clone + ?Sized + KeyConstraint, V: Clone + ?Sized + ValueConstraint> Clone for DefaultProperty<K, V>
Source§fn clone(&self) -> DefaultProperty<K, V>
fn clone(&self) -> DefaultProperty<K, V>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> Debug for DefaultProperty<K, V>
impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> Debug for DefaultProperty<K, V>
Source§impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> PartialEq for DefaultProperty<K, V>
impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> PartialEq for DefaultProperty<K, V>
Source§impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> Property<K, V> for DefaultProperty<K, V>
impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> Property<K, V> for DefaultProperty<K, V>
fn get_config(&self) -> &dyn PropertyConfig<K, V>
Source§fn get_value(&self) -> Option<Box<V>>
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>)
fn add_change_listener(&self, listener: PropertyChangeListener<K, V>)
listeners to the value change, notified once value changed
fn clone_boxed(&self) -> Box<dyn Property<K, V>>
fn to_boxed(self) -> Box<dyn Property<K, V>>
Source§impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> RawProperty for DefaultProperty<K, V>
impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> RawProperty for DefaultProperty<K, V>
fn get_raw_config(&self) -> &dyn RawPropertyConfig
Source§fn get_raw_value(&self) -> Option<Box<dyn Value>>
fn get_raw_value(&self) -> Option<Box<dyn Value>>
property value, if not configured or no valid value, default to defaultValue Of PropertyConfig
Source§fn add_raw_change_listener(&self, listener: RawPropertyChangeListener)
fn add_raw_change_listener(&self, listener: RawPropertyChangeListener)
listeners to the value change, notified once value changed
Source§fn get_source(&self) -> Option<Box<dyn ConfigurationSource>>
fn get_source(&self) -> Option<Box<dyn ConfigurationSource>>
which configuration source is actually used
return None if using default value
fn clone_boxed(&self) -> Box<dyn RawProperty>
fn to_boxed(self) -> Box<dyn RawProperty>
fn as_trait_ref(&self) -> &dyn RawProperty
fn as_trait_mut(&mut self) -> &mut dyn RawProperty
impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> Eq for DefaultProperty<K, V>
impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> Send for DefaultProperty<K, V>
impl<K: ?Sized + KeyConstraint, V: ?Sized + ValueConstraint> Sync for DefaultProperty<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for DefaultProperty<K, V>
impl<K, V> !RefUnwindSafe for DefaultProperty<K, V>
impl<K, V> Unpin for DefaultProperty<K, V>
impl<K, V> !UnwindSafe for DefaultProperty<K, V>
Blanket Implementations§
Source§impl<T> AnyExtension for Twhere
T: ?Sized,
impl<T> AnyExtension for Twhere
T: ?Sized,
Source§impl<T> AsAny for Twhere
T: Any,
impl<T> AsAny for Twhere
T: Any,
fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more