Struct oxygengine_user_interface::raui::core::widget::component::WidgetComponent [−][src]
pub struct WidgetComponent {
pub processor: fn(WidgetContext<'_>) -> WidgetNode,
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, Global>,
pub named_slots: HashMap<String, WidgetNode, RandomState>,
}Fields
processor: fn(WidgetContext<'_>) -> WidgetNodetype_name: Stringkey: Option<String>idref: Option<WidgetRef>props: Propslisted_slots: Vec<WidgetNode, Global>named_slots: HashMap<String, WidgetNode, RandomState>Implementations
impl WidgetComponent[src]
impl WidgetComponent[src]pub fn new(
processor: fn(WidgetContext<'_>) -> WidgetNode,
type_name: &str
) -> WidgetComponent[src]
processor: fn(WidgetContext<'_>) -> WidgetNode,
type_name: &str
) -> WidgetComponent
pub fn key<T>(self, v: T) -> WidgetComponent where
T: ToString, [src]
T: ToString,
pub fn idref<T>(self, v: T) -> WidgetComponent where
T: Into<WidgetRef>, [src]
T: Into<WidgetRef>,
pub fn with_props<T>(self, v: T) -> WidgetComponent where
T: 'static + PropsData, [src]
T: 'static + PropsData,
pub fn merge_props(self, v: Props) -> WidgetComponent[src]
pub fn with_shared_props<T>(self, v: T) -> WidgetComponent where
T: 'static + PropsData, [src]
T: 'static + PropsData,
pub fn merge_shared_props(self, v: Props) -> WidgetComponent[src]
pub fn listed_slot<T>(self, v: T) -> WidgetComponent where
T: Into<WidgetNode>, [src]
T: Into<WidgetNode>,
pub fn named_slot<T>(self, k: &str, v: T) -> WidgetComponent 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]pub fn clone(&self) -> WidgetComponent[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for WidgetComponent[src]
impl Debug for WidgetComponent[src]impl From<WidgetComponent> for WidgetNode[src]
impl From<WidgetComponent> for WidgetNode[src]pub fn from(component: WidgetComponent) -> WidgetNode[src]
impl TryFrom<WidgetNode> for WidgetComponent[src]
impl TryFrom<WidgetNode> for WidgetComponent[src]type Error = ()
The type returned in the event of a conversion error.
pub fn try_from(
node: WidgetNode
) -> Result<WidgetComponent, <WidgetComponent as TryFrom<WidgetNode>>::Error>[src]
node: WidgetNode
) -> Result<WidgetComponent, <WidgetComponent as TryFrom<WidgetNode>>::Error>
Auto Trait Implementations
impl !RefUnwindSafe for WidgetComponent
impl !RefUnwindSafe for WidgetComponentimpl Send for WidgetComponent
impl Send for WidgetComponentimpl Sync for WidgetComponent
impl Sync for WidgetComponentimpl Unpin for WidgetComponent
impl Unpin for WidgetComponentimpl !UnwindSafe for WidgetComponent
impl !UnwindSafe for WidgetComponent