pub struct DirectPropertyMetadata<T> { /* private fields */ }Expand description
Metadata for direct properties.
Implementations§
Source§impl<T: Clone + 'static> DirectPropertyMetadata<T>
impl<T: Clone + 'static> DirectPropertyMetadata<T>
pub fn new(unset_value: Option<T>) -> Self
pub fn with_default_binding_mode(self, mode: BindingMode) -> Self
pub fn with_enable_data_validation(self, enable: bool) -> Self
Sourcepub fn unset_value(&self) -> &T
pub fn unset_value(&self) -> &T
The value to use when the property is set to the unset value.
Methods from Deref<Target = FerroPropertyMetadata>§
Sourcepub fn default_binding_mode(&self) -> BindingMode
pub fn default_binding_mode(&self) -> BindingMode
The default binding mode for the property.
Sourcepub fn enable_data_validation(&self) -> Option<bool>
pub fn enable_data_validation(&self) -> Option<bool>
Whether the property is interested in data validation.
Data validation is validation performed at the target of a binding, for example in a view model. To enable it on a binding, the property must also enable it here.
Sourcepub fn is_read_only(&self) -> bool
pub fn is_read_only(&self) -> bool
Whether the metadata has been frozen.
Trait Implementations§
Source§impl<T: Clone> Clone for DirectPropertyMetadata<T>
impl<T: Clone> Clone for DirectPropertyMetadata<T>
Source§impl<T> Deref for DirectPropertyMetadata<T>
impl<T> Deref for DirectPropertyMetadata<T>
Source§type Target = FerroPropertyMetadata
type Target = FerroPropertyMetadata
The resulting type after dereferencing.
Source§fn deref(&self) -> &FerroPropertyMetadata
fn deref(&self) -> &FerroPropertyMetadata
Dereferences the value.
Auto Trait Implementations§
impl<T> Freeze for DirectPropertyMetadata<T>
impl<T> RefUnwindSafe for DirectPropertyMetadata<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for DirectPropertyMetadata<T>
impl<T> Sync for DirectPropertyMetadata<T>
impl<T> Unpin for DirectPropertyMetadata<T>
impl<T> UnsafeUnpin for DirectPropertyMetadata<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for DirectPropertyMetadata<T>where
Option<T>: UnwindSafe,
Blanket Implementations§
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more