Skip to main content

register_factory

Macro register_factory 

Source
macro_rules! register_factory {
    ($product:ty, $id:literal, $implement:ty) => { ... };
}
Expand description

为产品类型注册工厂实现的宏。

注册一个工厂,该工厂创建 $implement 的实例作为 $product trait 的实现。