DataTemplate
struct · ferroui-markup-xaml · v0.5.0
struct DataTemplate
A template that builds the control that presents a piece of data, as markup declares it.
Members
newdata_typeset_data_typecontentset_contentmatch_buildbuild_with_existingfrom_data_templateas_data_template
new
fn new() -> Rc<Self>
data_type
fn data_type(self: &Self) -> Option<ValueType>
The type of data the template is for: the handle type of a class
(Ref<T>), the type of a model object or of a value. None matches
all data.
set_data_type
fn set_data_type(self: &Self, value: Option<ValueType>)
content
fn content(self: &Self) -> Option<BoxedValue>
The template content: deferred content built for each piece of data.
set_content
fn set_content(self: &Self, value: Option<BoxedValue>)
match_
fn match_(self: &Self, data: Option<&BoxedValue>) -> bool
Whether the template is for data.
build
fn build(self: &Self, data: Option<&BoxedValue>) -> Option<Ref<Control>>
Builds the control for data.
build_with_existing
fn build_with_existing(self: &Self, _data: Option<&BoxedValue>, existing: Option<Ref<Control>>) -> Option<Ref<Control>>
Builds the control for data, or reuses existing.
from_data_template
fn from_data_template(template: &Rc<dyn IDataTemplate>) -> Option<Rc<DataTemplate>>
The template behind a data template handle, if it is one of this class (the cast of the contract back to the class).
as_data_template
fn as_data_template(self: &Self) -> Rc<dyn IDataTemplate>
The template as the data template contract.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyAnyValueClassDefaultsErasedDestructorIntoEitherITemplateWithParam<Option<Rc<dyn AnyValue>>, Option<Ref<Control>>>IDataTemplateIRecyclingDataTemplateITypedDataTemplatePartialEqMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.