pub struct BoxComponent<M, Ev, Err>(/* private fields */);Expand description
A boxed component. It is not initialized directly, but constructed by
Child::into_boxed or Root::into_boxed.
Trait Implementations§
Source§impl<M, Ev, Err: Debug> Component for BoxComponent<M, Ev, Err>
impl<M, Ev, Err: Debug> Component for BoxComponent<M, Ev, Err>
Source§type Init<'a> = Infallible
type Init<'a> = Infallible
Initial parameter type.
Source§async fn init(
init: Self::Init<'_>,
_sender: &ComponentSender<Self>,
) -> Result<Self, Self::Error>
async fn init( init: Self::Init<'_>, _sender: &ComponentSender<Self>, ) -> Result<Self, Self::Error>
Create the initial component.
Source§async fn start(&mut self, sender: &ComponentSender<Self>) -> !
async fn start(&mut self, sender: &ComponentSender<Self>) -> !
Start the event listening.
Source§async fn update_children(&mut self) -> Result<bool, Self::Error>
async fn update_children(&mut self) -> Result<bool, Self::Error>
Update the children components. Return true if any child needs render.
Source§async fn update(
&mut self,
message: Self::Message,
sender: &ComponentSender<Self>,
) -> Result<bool, Self::Error>
async fn update( &mut self, message: Self::Message, sender: &ComponentSender<Self>, ) -> Result<bool, Self::Error>
Respond to the message. Return true if need render.
Auto Trait Implementations§
impl<M, Ev, Err> !RefUnwindSafe for BoxComponent<M, Ev, Err>
impl<M, Ev, Err> !Send for BoxComponent<M, Ev, Err>
impl<M, Ev, Err> !Sync for BoxComponent<M, Ev, Err>
impl<M, Ev, Err> !UnwindSafe for BoxComponent<M, Ev, Err>
impl<M, Ev, Err> Freeze for BoxComponent<M, Ev, Err>
impl<M, Ev, Err> Unpin for BoxComponent<M, Ev, Err>
impl<M, Ev, Err> UnsafeUnpin for BoxComponent<M, Ev, Err>
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