std only.Expand description
Wrapper for a Collect or Subscribe to allow it to be dynamically reloaded.
This module provides a type implementing Subscribe and Filter
which wraps another type implementing the corresponding trait. This
allows the wrapped type to be replaced with another
instance of that type at runtime.
This can be used in cases where a subset of Collect or Filter functionality
should be dynamically reconfigured, such as when filtering directives may
change at runtime. Note that this subscriber introduces a (relatively small)
amount of overhead, and should thus only be used as needed.
§Note
//! The Subscribe implementation is unable to implement downcasting functionality,
so certain Subscribers will fail to reload if wrapped in a reload::Subscriber.
If you only want to be able to dynamically change the
Filter on your layer, prefer wrapping that Filter in the reload::Subscriber.
Structs§
- Error
- Indicates that an error occurred when reloading a subscriber.
- Handle
- Allows reloading the state of an associated
Collect. - Subscriber
- Wraps a
FilterorSubscribe, allowing it to be reloaded dynamically at runtime.