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.
Members
name
name: &'static str
The pre-defined name of the part.
type_
type_: &'static ferroui_base::TypeInfo
The type of the named part: the part is of this class or a class derived from it.
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.
new
const fn new(name: &'static str, type_: &'static TypeInfo) -> Self
Declares an optional part.
required
const fn required(name: &'static str, type_: &'static TypeInfo) -> Self
Declares a required part.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherCloneCopyDebugStructuralPartialEqPartialEqEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.