FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    new

    fn new() -> Rc<Self>
    

    Source

    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.

    Source

    set_data_type

    fn set_data_type(self: &Self, value: Option<ValueType>)
    

    Source

    content

    fn content(self: &Self) -> Option<BoxedValue>
    

    The template content: deferred content built for each piece of data.

    Source

    set_content

    fn set_content(self: &Self, value: Option<BoxedValue>)
    

    Source

    match_

    fn match_(self: &Self, data: Option<&BoxedValue>) -> bool
    

    Whether the template is for data.

    Source

    build

    fn build(self: &Self, data: Option<&BoxedValue>) -> Option<Ref<Control>>
    

    Builds the control for data.

    Source

    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.

    Source

    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).

    Source

    as_data_template

    fn as_data_template(self: &Self) -> Rc<dyn IDataTemplate>
    

    The template as the data template contract.

    Source

    Trait implementations

    Availability

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