pub struct WidgetComponent {
pub processor: FnWidget,
pub type_name: String,
pub key: Option<String>,
pub idref: Option<WidgetRef>,
pub props: Props,
pub shared_props: Option<Props>,
pub listed_slots: Vec<WidgetNode>,
pub named_slots: HashMap<String, WidgetNode>,
}
Fields§
§processor: FnWidget
§type_name: String
§key: Option<String>
§idref: Option<WidgetRef>
§props: Props
§listed_slots: Vec<WidgetNode>
§named_slots: HashMap<String, WidgetNode>
Implementations§
source§impl WidgetComponent
impl WidgetComponent
pub fn new(processor: FnWidget, type_name: impl ToString) -> Self
pub fn key<T>(self, v: T) -> Selfwhere
T: ToString,
pub fn idref<T>(self, v: T) -> Self
pub fn maybe_idref<T>(self, v: Option<T>) -> Self
pub fn with_props<T>(self, v: T) -> Selfwhere
T: 'static + PropsData,
pub fn maybe_with_props<T>(self, v: Option<T>) -> Selfwhere
T: 'static + PropsData,
pub fn merge_props(self, v: Props) -> Self
pub fn listed_slot<T>(self, v: T) -> Selfwhere
T: Into<WidgetNode>,
pub fn maybe_listed_slot<T>(self, v: Option<T>) -> Selfwhere
T: Into<WidgetNode>,
pub fn listed_slots<I, T>(self, v: I) -> Self
pub fn named_slot<T>(self, k: impl ToString, v: T) -> Selfwhere
T: Into<WidgetNode>,
pub fn maybe_named_slot<T>(self, k: impl ToString, v: Option<T>) -> Selfwhere
T: Into<WidgetNode>,
pub fn named_slots<I, K, T>(self, v: I) -> Self
pub fn remap_props<F>(&mut self, f: F)
Trait Implementations§
source§impl Clone for WidgetComponent
impl Clone for WidgetComponent
source§fn clone(&self) -> WidgetComponent
fn clone(&self) -> WidgetComponent
Returns a copy 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 moresource§impl Debug for WidgetComponent
impl Debug for WidgetComponent
source§impl From<WidgetComponent> for WidgetNode
impl From<WidgetComponent> for WidgetNode
source§fn from(component: WidgetComponent) -> Self
fn from(component: WidgetComponent) -> Self
Converts to this type from the input type.
source§impl TryFrom<WidgetNode> for WidgetComponent
impl TryFrom<WidgetNode> for WidgetComponent
Auto Trait Implementations§
impl Freeze for WidgetComponent
impl !RefUnwindSafe for WidgetComponent
impl Send for WidgetComponent
impl Sync for WidgetComponent
impl Unpin for WidgetComponent
impl !UnwindSafe for WidgetComponent
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)