Struct sauron::dom::StatefulModel
source · 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>
source§fn eq(&self, other: &StatefulModel<MSG>) -> bool
fn eq(&self, other: &StatefulModel<MSG>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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