[][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.

Enums

Autojoin

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

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 Builder and Result<Builder, Error> possible.

Functions

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.