pub struct WidgetAttributeSchema {
pub required: HashSet<&'static str>,
pub optional: HashSet<&'static str>,
pub events: HashSet<&'static str>,
pub style_attributes: HashSet<&'static str>,
pub layout_attributes: HashSet<&'static str>,
}Expand description
Schema defining valid attributes for a widget type.
Fields§
§required: HashSet<&'static str>§optional: HashSet<&'static str>§events: HashSet<&'static str>§style_attributes: HashSet<&'static str>§layout_attributes: HashSet<&'static str>Implementations§
Source§impl WidgetAttributeSchema
impl WidgetAttributeSchema
Sourcepub fn for_widget(kind: &WidgetKind) -> Self
pub fn for_widget(kind: &WidgetKind) -> Self
Returns the schema for a specific widget kind.
Sourcepub fn all_valid(&self) -> HashSet<&'static str>
pub fn all_valid(&self) -> HashSet<&'static str>
Returns all valid attributes (required + optional + events + style + layout).
Sourcepub fn all_valid_names(&self) -> Vec<&'static str>
pub fn all_valid_names(&self) -> Vec<&'static str>
Returns a list of all valid attribute names as a vector.
Trait Implementations§
Source§impl Clone for WidgetAttributeSchema
impl Clone for WidgetAttributeSchema
Source§fn clone(&self) -> WidgetAttributeSchema
fn clone(&self) -> WidgetAttributeSchema
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WidgetAttributeSchema
impl RefUnwindSafe for WidgetAttributeSchema
impl Send for WidgetAttributeSchema
impl Sync for WidgetAttributeSchema
impl Unpin for WidgetAttributeSchema
impl UnwindSafe for WidgetAttributeSchema
Blanket Implementations§
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