pub struct StatefulModel<MSG> {
pub comp: Rc<RefCell<dyn StatefulComponent>>,
pub type_id: TypeId,
pub attrs: Vec<Attribute<MSG>>,
pub children: Vec<Node<MSG>>,
}
Expand description
Wrapper for stateful component
Fields§
§comp: Rc<RefCell<dyn StatefulComponent>>
§type_id: TypeId
component type id
attrs: Vec<Attribute<MSG>>
component attributes
children: Vec<Node<MSG>>
external children component
Implementations§
Source§impl<MSG> StatefulModel<MSG>
impl<MSG> StatefulModel<MSG>
Sourcepub fn map_msg<F, MSG2>(self, cb: F) -> StatefulModel<MSG2>
pub fn map_msg<F, MSG2>(self, cb: F) -> StatefulModel<MSG2>
mape the msg of this Leaf such that Leaf<MSG>
becomes Leaf<MSG2>
Trait Implementations§
Source§impl<MSG> Clone for StatefulModel<MSG>
impl<MSG> Clone for StatefulModel<MSG>
Source§fn clone(&self) -> StatefulModel<MSG>
fn clone(&self) -> StatefulModel<MSG>
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<MSG> Debug for StatefulModel<MSG>
impl<MSG> Debug for StatefulModel<MSG>
Source§impl<MSG> PartialEq for StatefulModel<MSG>
impl<MSG> PartialEq for StatefulModel<MSG>
Auto Trait Implementations§
impl<MSG> Freeze for StatefulModel<MSG>
impl<MSG> !RefUnwindSafe for StatefulModel<MSG>
impl<MSG> !Send for StatefulModel<MSG>
impl<MSG> !Sync for StatefulModel<MSG>
impl<MSG> Unpin for StatefulModel<MSG>
impl<MSG> !UnwindSafe for StatefulModel<MSG>
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