Skip to main content

Crate thinkingdata_core

Crate thinkingdata_core 

Source
Expand description

Core implementation of the ThinkingData Analytics Rust SDK.

This crate carries all functional logic: the wire-format data::Data model, input validation, diagnostics logging, and the three consumers (log, batch, debug) ported from the official ThinkingData Go/Lua SDKs. The thinkingdata facade crate re-exports everything and adds a CLI.

§Feature flags

  • blocking (default): the synchronous consumer::Consumer trait, TDAnalytics, and blocking consumer methods.
  • async: the [consumer::AsyncConsumer] trait, [TDAnalyticsAsync], and *_async consumer methods. Internals are streaming pipelines built on Tokio (channel-fed writer/sender tasks).

Both features may be enabled together; every consumer then implements both traits.

§TLS

HTTP transport uses reqwest 0.13 with its default rustls stack backed by the aws-lc-rs crypto provider only; no native-tls/openssl backend is supported or compiled in.

§Quick start (blocking)



§Quick start (async)



Re-exports§

pub use data::Data;
pub use data::DataType;
pub use data::IntoPropertyMap;
pub use data::LIB_NAME;
pub use data::PRESET_PROPERTIES;
pub use data::is_preset_property;
pub use error::Result;
pub use error::TDError;
pub use analytics::TDAnalytics;

Modules§

analytics
The analytics facades: TDAnalytics (blocking) and [TDAnalyticsAsync] (async).
consumer
Delivery mechanisms for Data: the Consumer / [AsyncConsumer] traits and the three built-in consumers ported from the Go SDK.
data
The wire-format data model of the ThinkingData receiver.
error
Error type shared by the whole SDK.
log
SDK diagnostics logging.
utils
Time and validation helpers shared by the analytics facade and consumers.

Constants§

SDK_VERSION
The version of the SDK, reported as #lib_version on every event.