Skip to main content

basaltic/
lib.rs

1//! Typed asynchronous clients for the Basaltic API.
2//!
3//! Service methods return request builders. Call `.send().await` to execute them;
4//! use `.options(...)` for account selection, idempotency keys and custom headers.
5//! See the README and generated API reference for examples.
6#![doc = include_str!("../README.md")]
7
8mod auth;
9mod config;
10mod error;
11pub mod models;
12mod request;
13mod response;
14pub mod services;
15mod transport;
16
17pub use auth::{Credentials, TokenFuture, TokenProvider};
18pub use config::{Config, RequestOptions};
19pub use error::{ApiError, Error, Result};
20pub use request::{BinaryRequest, EmptyRequest, PagedRequest, Request, WebSocketRequest};
21pub use reqwest::{Body, Response as BinaryResponse};
22pub use response::{ApiResponse, Nullable, Page, WebSocketConnection};
23pub use transport::Client;
24
25/// Generate once per logical mutation and reuse when retrying that mutation.
26pub fn new_idempotency_key() -> String {
27    uuid::Uuid::new_v4().to_string()
28}