pub trait RouterDestination: Send + Sync {
// Required methods
fn exec_component(&self);
fn shard_id(&self) -> &'static str;
// Provided method
fn life_cycle(&self) -> ShardStateLifeCycle { ... }
}Expand description
A navigation destination produced automatically by the #[shard] macro.
You should not manually implement this trait. Each annotated shard function
creates a *Destination struct that implements RouterDestination.
Required Methods§
Sourcefn exec_component(&self)
fn exec_component(&self)
Execute the component associated with this destination.
Provided Methods§
Sourcefn life_cycle(&self) -> ShardStateLifeCycle
fn life_cycle(&self) -> ShardStateLifeCycle
Lifecycle policy for the shard state tied to this destination.
Default is Shard, which means the associated shard state will be
removed from the registry when this destination is popped.
Override in generated implementations to persist for the whole app.