FuncTreeDataTemplate
struct · ferroui-controls · v0.5.0
struct FuncTreeDataTemplate
A template used to build hierarchical data.
items_selector returns the child items of an item as the untyped value
assigned to the target property, so it must hold exactly the value type
of that property.
Members
new
fn new(match_: impl Fn(Option<&BoxedValue>) -> bool + 'static, build: impl Fn(&Option<BoxedValue>, &NameScopeRef) -> Option<Ref<Control>> + 'static, items_selector: impl Fn(&BoxedValue) -> BoxedValue + 'static) -> Rc<Self>
Creates a tree data template.
for_type
fn for_type<T: 'static>(build: impl Fn(&T, &NameScopeRef) -> Option<Ref<Control>> + 'static, items_selector: impl Fn(&T) -> BoxedValue + 'static) -> Rc<Self>
Creates a tree data template that matches data of type T.
for_type_with_match
fn for_type_with_match<T: 'static>(match_: impl Fn(&T) -> bool + 'static, build: impl Fn(&T, &NameScopeRef) -> Option<Ref<Control>> + 'static, items_selector: impl Fn(&T) -> BoxedValue + 'static) -> Rc<Self>
Creates a tree data template that matches data of type T accepted
by match_.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherITemplateWithParam<Option<Rc<dyn AnyValue>>, Option<Ref<Control>>>IDataTemplateIRecyclingDataTemplateITreeDataTemplate
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.