Skip to main content

RouterDestination

Trait RouterDestination 

Source
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§

Source

fn exec_component(&self, controller: State<RouterController>)

Execute the component associated with this destination.

Source

fn exec_component_handle( &self, ) -> Arc<dyn Fn(State<RouterController>) + Send + Sync> ⓘ

Copies the component entry point so it can run without borrowing self.

Source

fn destination_id() -> &'static str
where 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".

Implementors§