mesa_dev/lib.rs
1//! Mesa's Rust SDK
2//!
3//! Provides both an ergonomic [`MesaClient`] and direct access to the
4//! lower-level modules generated from the `OpenAPI` spec.
5//!
6//! The [`low_level`] module contains the generated API functions and
7//! hand-written workarounds for endpoints where the code generator
8//! produces incorrect types.
9//!
10//! # Quick Start
11//!
12//! ```rust,no_run
13//! use mesa_dev::MesaClient;
14//! use futures::TryStreamExt;
15//!
16//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
17//! let client = MesaClient::builder()
18//! .build()?;
19//!
20//! // List repositories
21//! let repos: Vec<_> = client.org("my-org").repos().list(None).try_collect().await?;
22//!
23//! // Get file content
24//! let content = client
25//! .org("my-org")
26//! .repos().at("my-repo")
27//! .content()
28//! .get(None, Some("README.md"), None)
29//! .await?;
30//! # Ok(())
31//! # }
32//! ```
33
34pub mod client;
35pub mod grpc;
36pub mod low_level;
37
38pub use client::{BuildError, MesaClient, DEFAULT_GRPC_ENDPOINT};
39
40/// Re-export of [`futures_core::Stream`] for consuming paginated results.
41pub use futures_core::Stream;
42
43/// OpenAPI-generated request and response model types.
44///
45/// All structs implement `serde::Serialize` and `serde::Deserialize`.
46#[doc(inline)]
47pub use mesa_dev_oapi::models;