[−][src]Module spirit::extension
Interfaces for extending the Spirit
and Builder
with callbacks.
Both the Spirit
and Builder
types allow registering callbacks. The Extensible
trait
describes the interface for registering them.
Furthermore, Extensible
is also implemented for Result
s containing them. This allows
chaining the building without manually handling the errors. The error then can be handled by
SpiritBuilder::run
and logged, without making a distinction if it comes from the setup or
application run.
Some libraries might want to provide bits of functionality that need to register several
different callbacks at once to work properly. This is described by the Extension
trait.
In addition, the module contains few useful extensions that may be plugged in.
Traits
Extensible | An interface allowing to extend something with callbacks. |
Extension | The basic extension trait. |
IntoResult | An internal trait to make working uniformly with the |
Functions
cfg_store | An extension to store configuration to some global-ish storage. |
immutable_cfg | An extension to warn about changes to configuration that can't be updated at runtime. |
immutable_cfg_init | An extension for one-time initial configuration. |