Module roopes::patterns

source ·
Expand description

Object oriented patterns.

Modules

  • Doc images not enabled. Compile with feature doc-images and Rust version >= 1.54 to enable. Provides an abstraction for object creation.
  • Doc images not enabled. Compile with feature doc-images and Rust version >= 1.54 to enable. Contains types which encapsulate a repeatedly callable block of code.
  • Contains types which allow client code to generate, use, and re-use heap-allocated objects efficiently.
  • Contains types which implement the “Observer” pattern, in which a single object is used to delegate notifications to a group of dynamic listening object.
  • Exposes submodules and their preludes at the library level.
  • 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.
  • This module implements the State pattern.
  • Provides arbitrarily chained groups of crate::primitives::transformer::Transformers to be setup and used repeatedly.

Derive Macros

  • Creates a new type on the specified struct, which allows fields to be set one at a time. The new builder type’s name is the specified type, appended with “Builder”.
  • Creates a Publisher and Subscriber for the given message type.
  • Creates a new trait for user code to implement on the specified enum. This trait requires implementors to implement handlers for all the specified variants in the given enum.