You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a method to resolve some component from the System or is the expected workflow to kick-off a program in an associated Lifecycle? E.g. the later,
#[derive(Component)]
struct StartProgram { }
#[async_trait]
impl ComponentLifecycle for StartProgram {
async start(&mut self) {
// start main program logic and add injected stuff to StartProgram constructor
The text was updated successfully, but these errors were encountered:
Is there a method to resolve some component from the System
There is no public method for this at this moment. In the future, I might add it for testing purpose.
is the expected workflow to kick-off a program in an associated Lifecycle?
Hmmmmm, I am not 100% following the question.
A program should kick-off a System and the system will initialize & start all components.
#[derive(Component)]#[lifecycle]structStartProgram{#[injected]stuff:Injected<SomeType>}#[async_trait]implComponentLifecycleforStartProgram{async start(&mutself){// At this point, all dependency of StartProgram would have been initialized & started. self.stuff.do_something();
Is there a method to resolve some component from the
System
or is the expected workflow to kick-off a program in an associated Lifecycle? E.g. the later,The text was updated successfully, but these errors were encountered: