pub struct Component { /* private fields */ }Trait Implementations
sourceimpl Update for Component
impl Update for Component
type Model = ViewModel
type Model = ViewModel
The type of the model.
type ModelParam = ()
type ModelParam = ()
The type of the parameter of the model() function used to initialize the model.
sourcefn model(relm: &Relm<Self>, _model: Self::ModelParam) -> Self::Model
fn model(relm: &Relm<Self>, _model: Self::ModelParam) -> Self::Model
Create the initial model.
sourcefn subscriptions(&mut self, _relm: &Relm<Self>)
fn subscriptions(&mut self, _relm: &Relm<Self>)
Connect the subscriptions.
Subscriptions are
Future/Stream that are spawn when the object is created. Read moresourceimpl Widget for Component
impl Widget for Component
sourcefn on_add<W>(&self, _parent: W)where
W: IsA<Widget> + IsA<Object>,
fn on_add<W>(&self, _parent: W)where
W: IsA<Widget> + IsA<Object>,
Method called when the widget is added to its parent.
This is currently only used to set the child properties of a widget as relm widget could
have child properties and we don’t know its parent when it is defined. Thus, we call
on_add() when it is added to its parent to set the child properties. Read more
sourcefn parent_id() -> Option<&'static str>
fn parent_id() -> Option<&'static str>
Get the parent ID.
This is useful for custom Container implementation: when you implement the
Container::add_widget(), you might want to
insert widgets elsewhere depending of this id. Read moresourcefn run(model_param: Self::ModelParam) -> Result<(), BoolError>where
Self: 'static,
fn run(model_param: Self::ModelParam) -> Result<(), BoolError>where
Self: 'static,
Create the window from this widget and start the main loop.
Auto Trait Implementations
impl !RefUnwindSafe for Component
impl !Send for Component
impl !Sync for Component
impl Unpin for Component
impl !UnwindSafe for Component
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more