FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TemplatePartAttribute

    struct · ferroui-controls · v0.5.0

    struct TemplatePartAttribute
    

    Declares that a templated control expects a named part of a given type in its control template.

    Classes expose their parts through a template_parts() function.

    View source

    Members

    name

    name: &'static str
    

    The pre-defined name of the part.

    Source

    type_

    type_: &'static ferroui_base::TypeInfo
    

    The type of the named part: the part is of this class or a class derived from it.

    Source

    is_required

    is_required: bool
    

    Whether the part is required to be present in the template. A required part not found in the template is an error.

    Source

    new

    const fn new(name: &'static str, type_: &'static TypeInfo) -> Self
    

    Declares an optional part.

    Source

    required

    const fn required(name: &'static str, type_: &'static TypeInfo) -> Self
    

    Declares a required part.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Copy
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Eq

    Availability

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