Skip to main content

SocketRouterFunction

Trait SocketRouterFunction 

Source
pub trait SocketRouterFunction<Req, Resp>:
    Send
    + Sync
    + Clone
where Self: Send + Sync + Clone, Req: Serialize + for<'de> Deserialize<'de> + Clone + Debug, Resp: Serialize + for<'de> Deserialize<'de> + Clone + Debug,
{ // Required method fn route( &self, msg: Req, connection_id: String, ) -> Pin<Box<dyn Future<Output = Option<Resp>> + Send>>; }

Required Methods§

Source

fn route( &self, msg: Req, connection_id: String, ) -> Pin<Box<dyn Future<Output = Option<Resp>> + Send>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§