axcp/
lib.rs

1//! # AXCP Rust SDK
2//! 
3//! A Rust implementation of the AXCP client SDK.
4
5#![warn(missing_docs)]
6#![warn(rustdoc::missing_crate_level_docs)]
7#![doc(html_logo_url = "https://example.com/logo.png")]
8
9pub mod client;
10pub mod error;
11pub mod models;
12pub mod telemetry;
13
14/// Re-exports commonly used types
15pub mod prelude {
16    pub use crate::client::Client;
17    pub use crate::error::{Error, Result};
18    pub use crate::models::*;
19    pub use crate::telemetry::TelemetryClient;
20}
21
22use error::Result;
23
24/// Current version of the SDK
25pub const VERSION: &str = env!("CARGO_PKG_VERSION");
26
27/// Initialize the SDK with default settings
28///
29/// # Errors
30///
31/// Returns an error if the logger setup fails
32pub fn init() -> Result<()> {
33    // Set up default tracing subscriber
34    tracing_subscriber::fmt()
35        .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()
36            .add_directive(tracing::Level::INFO.into()))
37        .try_init()
38        .map_err(|e| error::Error::Other(e.to_string()))
39}