pub struct Component { /* private fields */ }Expand description
Main relm component of the application
Most importantly implements relm::Widget as an UI application.
See Component::view for initialization code.
Trait Implementations§
Source§impl Update for Component
impl Update for Component
Source§type ModelParam = ()
type ModelParam = ()
The type of the parameter of the model() function used to initialize the model.
Source§fn model(_relm: &Relm<Self>, _model: Self::ModelParam) -> Self::Model
fn model(_relm: &Relm<Self>, _model: Self::ModelParam) -> Self::Model
Create the initial model.
Source§fn 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.Source§impl Widget for Component
impl Widget for Component
Source§type Root = ApplicationWindow
type Root = ApplicationWindow
The type of the root widget.
Source§fn init_view(&mut self)
fn init_view(&mut self)
Update the view after it is initially created.
This method is only useful when using the
#[widget] attribute, because when not using it,
you can use the view() method instead.Source§fn on_add<W>(&self, _parent: W)
fn on_add<W>(&self, _parent: W)
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.
Auto Trait Implementations§
impl Freeze for Component
impl !RefUnwindSafe for Component
impl !Send for Component
impl !Sync for Component
impl Unpin for Component
impl !UnwindSafe for Component
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