pub struct WidgetCatalog {
pub name: String,
pub version: String,
pub token_presets: Vec<DesignTokenSet>,
pub platform_styles: Vec<PlatformStyle>,
pub recipe_kinds: Vec<AppRecipeKind>,
pub widgets: Vec<WidgetDescriptor>,
}Fields§
§name: String§version: String§token_presets: Vec<DesignTokenSet>§platform_styles: Vec<PlatformStyle>§recipe_kinds: Vec<AppRecipeKind>§widgets: Vec<WidgetDescriptor>Implementations§
Source§impl WidgetCatalog
impl WidgetCatalog
pub fn find(&self, id: &str) -> Option<&WidgetDescriptor>
pub fn by_category(&self, category: WidgetCategory) -> Vec<&WidgetDescriptor>
pub fn by_use_case(&self, use_case: WidgetUseCase) -> Vec<&WidgetDescriptor>
pub fn category_counts(&self) -> Vec<WidgetCategoryCount>
pub fn use_case_counts(&self) -> Vec<WidgetUseCaseCount>
pub fn complexity_counts(&self) -> Vec<WidgetComplexityCount>
pub fn summary(&self) -> WidgetCatalogSummary
pub fn query(&self, query: WidgetCatalogQuery) -> Vec<&WidgetDescriptor>
pub fn query_ids(&self, query: WidgetCatalogQuery) -> Vec<&str>
pub fn token_preset(&self, id: &str) -> Option<&DesignTokenSet>
pub fn validate(&self) -> Result<(), CatalogValidationError>
Trait Implementations§
Source§impl Clone for WidgetCatalog
impl Clone for WidgetCatalog
Source§fn clone(&self) -> WidgetCatalog
fn clone(&self) -> WidgetCatalog
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WidgetCatalog
impl Debug for WidgetCatalog
Source§impl<'de> Deserialize<'de> for WidgetCatalog
impl<'de> Deserialize<'de> for WidgetCatalog
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WidgetCatalog
impl PartialEq for WidgetCatalog
Source§fn eq(&self, other: &WidgetCatalog) -> bool
fn eq(&self, other: &WidgetCatalog) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for WidgetCatalog
impl Serialize for WidgetCatalog
impl StructuralPartialEq for WidgetCatalog
Auto Trait Implementations§
impl Freeze for WidgetCatalog
impl RefUnwindSafe for WidgetCatalog
impl Send for WidgetCatalog
impl Sync for WidgetCatalog
impl Unpin for WidgetCatalog
impl UnsafeUnpin for WidgetCatalog
impl UnwindSafe for WidgetCatalog
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