FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IDataTemplateSelector

    trait · ferroui-controls-repeater · v0.5.0

    trait IDataTemplateSelector
    

    Selects a template based on data and, optionally, the requesting container. The second overload is consulted only when the first returns no template.

    View source

    Members

    select_template

    fn select_template(self: &Self, item: Option<&BoxedValue>) -> Option<Rc<dyn IDataTemplate>>
    

    Source

    select_template_with_container

    fn select_template_with_container(self: &Self, item: Option<&BoxedValue>, container: Option<&Ref<Control>>) -> Option<Rc<dyn IDataTemplate>>
    

    Source

    try_select_template

    fn try_select_template(self: &Self, item: Option<&BoxedValue>) -> Result<Option<Rc<dyn IDataTemplate>>, ElementFactoryError>
    

    Fallible selectors retain their own error when the item or container overload fails. Returning no template is the only container fallback.

    Source

    try_select_template_with_container

    fn try_select_template_with_container(self: &Self, item: Option<&BoxedValue>, container: Option<&Ref<Control>>) -> Result<Option<Rc<dyn IDataTemplate>>, ElementFactoryError>
    

    Source

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.