Module patterns

Source
Expand description

Exposes types which conform most directly to the “Gang of Four” and other commonly accepted OOP-style patterns.

Modules§

abstract_factory
Provides an abstraction for object creation.
command
Contains types which encapsulate a repeatedly callable block of code.
heap_pool
Contains types which allow client code to generate, use, and re-use heap-allocated objects efficiently.
observer
Contains types which implement the “Observer” pattern, in which a single object is used to delegate notifications to a group of dynamic listening object.
prelude
Exposes submodules and their preludes at the library level.
publisher_subscriber
This module implements the Publisher-Subscriber pattern. In this model, a Publisher contains a list of Subscribers. When a message is delivered to the Publisher, it is then delegated directly to all its Subscribers, one at a time. Typically, implementations are dynamic, in that Subscribers are able to be dded or removed at will by the client code - these features are delineated separately in the DetachablePublisher and AttachablePublisher traits, but can be implemented by any Publisher, and together as a MutablePublisher.
state
This module implements the State pattern.
transformer_chain
Provides arbitrarily chained groups of crate::primitives::transformer::Transformers to be setup and used repeatedly.