pub struct ComponentSpec {
pub name: &'static str,
pub doc: &'static str,
pub display_name: &'static str,
pub icon: &'static str,
pub category: &'static str,
pub design_size: (f32, f32),
pub toolbox: bool,
pub props: &'static [Prop],
pub build: fn(&Props) -> Widget,
}Expand description
A registered component (see register).
Fields§
§name: &'static str§doc: &'static str§display_name: &'static str§icon: &'static str§category: &'static str§design_size: (f32, f32)§toolbox: bool§props: &'static [Prop]§build: fn(&Props) -> WidgetImplementations§
Source§impl ComponentSpec
impl ComponentSpec
pub fn of<C>() -> ComponentSpecwhere
C: Component,
Trait Implementations§
Source§impl Clone for ComponentSpec
impl Clone for ComponentSpec
Source§fn clone(&self) -> ComponentSpec
fn clone(&self) -> ComponentSpec
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 moreimpl Copy for ComponentSpec
Auto Trait Implementations§
impl Freeze for ComponentSpec
impl RefUnwindSafe for ComponentSpec
impl Send for ComponentSpec
impl Sync for ComponentSpec
impl Unpin for ComponentSpec
impl UnsafeUnpin for ComponentSpec
impl UnwindSafe for ComponentSpec
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