Expand description
§Helper traits for dynamic XSO builder registries.
Builder registries hold type-erased FromXml::from_events
implementations. Registries can be used to dynamically dispatch to a set
of FromXml
implementations which is not known at compile time.
Under the hood, they are used by the FromXml
implementation on
Xso<T>
, via the DynXso::Registry
type.
Note that registries generally do not allow to add arbitrary builders. All
builders must originate in a FromXml
implementation and their output
must be convertible to the specific type the registry is defined for.
The default implementation is BuilderRegistry
, which is only available
if xso
is built with the "std"
feature due to the inherent need for a
Mutex
.
Traits§
- DynXso
Registry Add - Trait for a builder registry supports registering new builders at runtime.
- DynXso
Registry Lookup - Trait for a builder registry supports constructing elements.