Skip to main content

uni_sdk/
lib.rs

1//! Official Rust SDK for the Unimatrix HTTP API.
2//!
3//! [`UniClient`] provides typed access to SMS messages and OTP verification.
4//! Credentials can be supplied explicitly or loaded from `UNIMTX_ACCESS_KEY_ID`
5//! and `UNIMTX_ACCESS_KEY_SECRET` with [`UniClient::from_env`].
6
7#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
8
9mod client;
10mod error;
11mod models;
12mod services;
13mod signer;
14
15#[cfg(feature = "blocking")]
16pub mod blocking;
17
18pub use client::{UniClient, UniClientBuilder, DEFAULT_ENDPOINT, DEFAULT_SIGNING_ALGORITHM};
19pub use error::{Result, UniError};
20pub use models::*;
21pub use services::{MessageService, OtpService};
22
23/// Version of this SDK package.
24pub const VERSION: &str = env!("CARGO_PKG_VERSION");
25
26/// User agent sent with API requests.
27pub const USER_AGENT: &str = concat!("uni-rust-sdk/", env!("CARGO_PKG_VERSION"));