🛈 Note: This is pre-release documentation for the upcoming tracing 0.2.0 ecosystem.

For the release documentation, please see docs.rs, instead.

Available on crate feature 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§

  • Indicates that an error occurred when reloading a subscriber.
  • Allows reloading the state of an associated Collect.
  • Wraps a Filter or Subscribe, allowing it to be reloaded dynamically at runtime.