Skip to main content

Crate tracedb_sdk

Crate tracedb_sdk 

Source
Expand description

§TraceDB v1 HTTP API SDK

The official Rust SDK for the TraceDB v1 HTTP API.

§Getting Started

use trace_db_api::prelude::*;

#[tokio::main]
async fn main() {
    let config = ClientConfig {
        token: Some("<token>".to_string()),
        ..Default::default()
    };
    let client = ApiClient::new(config).expect("Failed to build client");
    client
        .tracedb
        .admin
        .post_admin_compact(
            &EmptyObject(HashMap::from([(
                "key".to_string(),
                serde_json::json!("value"),
            )])),
            None,
        )
        .await;
}

§Modules

  • api - Core API types and models
  • client - Client implementations
  • config - Configuration options
  • core - Core utilities and infrastructure
  • error - Error types and handling
  • prelude - Common imports for convenience

Re-exports§

pub use error::ApiError;
pub use error::BuildError;
pub use api::*;
pub use client::*;
pub use config::*;
pub use core::*;
pub use environment::*;

Modules§

api
API client and types for the TraceDB v1 HTTP API
client
config
core
Core client infrastructure
environment
error
prelude
Prelude module for convenient imports