Module to_static
Expand description
Utilities for converting borrowed data to owned data.
This module provides traits and implementations for converting types with lifetime
parameters to equivalent types with 'static
lifetime.
This is essential for storing telemetry data in contexts that require owned data, such as when sending
data across thread boundaries or storing it in global collectors.
§Core Trait
The ToStatic
trait provides a standardized way to convert borrowed data to
owned data while preserving the original structure and semantics.
§Usage
This is primarily used internally by the telemetry system to ensure that telemetry data can be safely stored and transmitted regardless of the original lifetime constraints of the input data.
Traits§
- ToStatic
- A trait for converting types with lifetime parameters to equivalent types with ’static lifetime.