pub trait RouterDestination:
Any
+ Send
+ Sync {
// Required methods
fn exec_component(&self, controller: State<RouterController>);
fn exec_component_handle(
&self,
) -> Arc<dyn Fn(State<RouterController>) + Send + Sync> ⓘ;
fn destination_id() -> &'static str
where Self: Sized;
}Expand description
A navigation destination produced by the #[shard] macro.
Required Methods§
Sourcefn exec_component(&self, controller: State<RouterController>)
fn exec_component(&self, controller: State<RouterController>)
Execute the component associated with this destination.
Sourcefn exec_component_handle(
&self,
) -> Arc<dyn Fn(State<RouterController>) + Send + Sync> ⓘ
fn exec_component_handle( &self, ) -> Arc<dyn Fn(State<RouterController>) + Send + Sync> ⓘ
Copies the component entry point so it can run without borrowing self.
Sourcefn destination_id() -> &'static strwhere
Self: Sized,
fn destination_id() -> &'static strwhere
Self: Sized,
Stable destination identifier used for route identity checks.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".