Skip to main content

DynKey

Trait DynKey 

Source
trait DynKey: Send + Sync {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn eq_dyn(&self, other: &dyn DynKey) -> bool;
}
Expand description

路由数据键:擦除 source 的具体类型,所有路由共用一份 Resource 实例化。

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Source

fn eq_dyn(&self, other: &dyn DynKey) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S: PartialEq + Send + Sync + 'static> DynKey for S