[][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 Results containing them. This allows chaining the building without manually handling the errors. The error then can be handled by Builder::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.



Selection of the way the background thread is handled at the end of the run method.



An interface allowing to extend something with callbacks.


The basic extension trait.


An internal trait to make working uniformly with the Builder and Result<Builder, Error> possible.



An extension to warn about changes to configuration that can't be updated at runtime.


An extension for one-time initial configuration.