Struct raui_core::widget::component::WidgetComponent [−][src]
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
impl WidgetComponent
[src]
impl WidgetComponent
[src]pub fn new(processor: FnWidget, type_name: &str) -> Self
[src]
pub fn key<T>(self, v: T) -> Self where
T: ToString,
[src]
T: ToString,
pub fn idref<T>(self, v: T) -> Self where
T: Into<WidgetRef>,
[src]
T: Into<WidgetRef>,
pub fn with_props<T>(self, v: T) -> Self where
T: 'static + PropsData,
[src]
T: 'static + PropsData,
pub fn merge_props(self, v: Props) -> Self
[src]
pub fn with_shared_props<T>(self, v: T) -> Self where
T: 'static + PropsData,
[src]
T: 'static + PropsData,
pub fn merge_shared_props(self, v: Props) -> Self
[src]
pub fn listed_slot<T>(self, v: T) -> Self where
T: Into<WidgetNode>,
[src]
T: Into<WidgetNode>,
pub fn named_slot<T>(self, k: &str, v: T) -> Self where
T: Into<WidgetNode>,
[src]
T: Into<WidgetNode>,
pub fn remap_props<F>(&mut self, f: F) where
F: FnMut(Props) -> Props,
[src]
F: FnMut(Props) -> Props,
Trait Implementations
impl Clone for WidgetComponent
[src]
impl Clone for WidgetComponent
[src]fn clone(&self) -> WidgetComponent
[src]
fn clone(&self) -> WidgetComponent
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for WidgetComponent
[src]
impl Debug for WidgetComponent
[src]impl From<WidgetComponent> for WidgetNode
[src]
impl From<WidgetComponent> for WidgetNode
[src]fn from(component: WidgetComponent) -> Self
[src]
fn from(component: WidgetComponent) -> Self
[src]Performs the conversion.
impl TryFrom<WidgetNode> for WidgetComponent
[src]
impl TryFrom<WidgetNode> for WidgetComponent
[src]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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more