Skip to main content

Crate rust_pattern_components

Crate rust_pattern_components 

Source

Macros§

assert_impl_one
Asserts that the type implements exactly one in a set of traits.
builder_helper
为构建器模式提供辅助方法的宏。
const_assert
Asserts that constant expressions evaluate to true.
register_factory
为产品类型注册工厂实现的宏。
submit
Enter an element into the plugin registry corresponding to its type.

Structs§

FactoryRegistry
工厂实现的注册表条目。
ObserverRegistry
观察者注册表
SimpleFactory
用于创建类型 T 实例的工厂集合。

Enums§

FactoryError
通过工厂创建对象时可能发生的错误。
FactoryFallback
当找不到指定 ID 的工厂时的处理策略。
NotifyStrategy
通知策略

Traits§

Factory
用于创建类型 T 实例的工厂 trait。
Observable
被观察者 trait
Observer
观察者 trait