veecle_telemetry/protocol/
mod.rs

1//! Telemetry protocol types and message definitions.
2//!
3//! # Submodule split
4//!
5//! The [`base`] module defines the main message definitions, generic over how they actually store
6//! their data. The [`transient`] and [`owned`] modules expose type aliases for the base definitions
7//! with specific data storage families. The [`transient`] data is created with references and
8//! thread-local data to avoid copying data when recording log events, this is what gets passed in
9//! to a [`crate::collector::Export`] implementor. The [`owned`] data uses heap allocation to allow
10//! passing the data around in-memory or across processes as needed.
11//!
12//! # Serialization
13//!
14//! Both [`transient`] and [`owned`] types implement [`serde::Serialize`], the [`owned`] types also
15//! implement [`serde::Deserialize`]; the types from both modules are compatible, so you can
16//! directly serialize a [`transient::LogMessage`] without any allocations then deserialize that as
17//! an [`owned::LogMessage`].
18
19pub mod base;
20#[cfg(feature = "alloc")]
21pub mod owned;
22pub mod transient;
23
24#[cfg(test)]
25mod tests;