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) -> WidgetComponent
pub fn key<T>(self, v: T) -> WidgetComponentwhere
T: ToString,
pub fn idref<T>(self, v: T) -> WidgetComponent
pub fn maybe_idref<T>(self, v: Option<T>) -> WidgetComponent
pub fn with_props<T>(self, v: T) -> WidgetComponentwhere
T: 'static + PropsData,
pub fn maybe_with_props<T>(self, v: Option<T>) -> WidgetComponentwhere
T: 'static + PropsData,
pub fn merge_props(self, v: Props) -> WidgetComponent
pub fn listed_slot<T>(self, v: T) -> WidgetComponentwhere
T: Into<WidgetNode>,
pub fn maybe_listed_slot<T>(self, v: Option<T>) -> WidgetComponentwhere
T: Into<WidgetNode>,
pub fn listed_slots<I, T>(self, v: I) -> WidgetComponent
pub fn named_slot<T>(self, k: impl ToString, v: T) -> WidgetComponentwhere
T: Into<WidgetNode>,
pub fn maybe_named_slot<T>(
self,
k: impl ToString,
v: Option<T>
) -> WidgetComponentwhere
T: Into<WidgetNode>,
pub fn named_slots<I, K, T>(self, v: I) -> WidgetComponent
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) -> WidgetNode
fn from(component: WidgetComponent) -> WidgetNode
Converts to this type from the input type.
source§impl TryFrom<WidgetNode> for WidgetComponent
impl TryFrom<WidgetNode> for WidgetComponent
source§fn try_from(
node: WidgetNode
) -> Result<WidgetComponent, <WidgetComponent as TryFrom<WidgetNode>>::Error>
fn try_from( node: WidgetNode ) -> Result<WidgetComponent, <WidgetComponent as TryFrom<WidgetNode>>::Error>
Performs the conversion.
Auto Trait Implementations§
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