pub struct TemplatePartAttribute {
pub name: &'static str,
pub type_: &'static TypeInfo,
pub is_required: bool,
}Expand description
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.
Fields§
§name: &'static strThe pre-defined name of the part.
type_: &'static TypeInfoThe type of the named part: the part is of this class or a class derived from it.
is_required: boolWhether the part is required to be present in the template. A required part not found in the template is an error.
Implementations§
Trait Implementations§
Source§impl Clone for TemplatePartAttribute
impl Clone for TemplatePartAttribute
impl Copy for TemplatePartAttribute
Source§impl Debug for TemplatePartAttribute
impl Debug for TemplatePartAttribute
impl Eq for TemplatePartAttribute
Source§impl PartialEq for TemplatePartAttribute
impl PartialEq for TemplatePartAttribute
impl StructuralPartialEq for TemplatePartAttribute
Auto Trait Implementations§
impl Freeze for TemplatePartAttribute
impl RefUnwindSafe for TemplatePartAttribute
impl Send for TemplatePartAttribute
impl Sync for TemplatePartAttribute
impl Unpin for TemplatePartAttribute
impl UnsafeUnpin for TemplatePartAttribute
impl UnwindSafe for TemplatePartAttribute
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more