Skip to main content

unitycatalog_common/
lib.rs

1//! Shared types and utilities for the Unity Catalog server and client crates.
2//!
3//! Most of the crate is the generated Unity Catalog data model, produced from the
4//! protobuf definitions in `proto/` and re-exported from [`models`]. On top of that
5//! it collects the hand-written pieces both sides of the API depend on:
6//!
7//! - [`error`] — the crate-wide [`Error`] and [`Result`] types.
8//! - [`reference`](mod@reference) — the `uc://` URL scheme for addressing catalog
9//!   securables ([`UCReference`]).
10//! - [`store`] — the storage-abstraction trait ([`ResourceStore`](store::ResourceStore))
11//!   implemented by backends (feature `store`).
12//! - [`services`] — envelope encryption for sealing sensitive fields inline
13//!   (feature `store`).
14//! - [`metric_view`] — the single parser for Unity Catalog metric-view definitions
15//!   (feature `metric-view`).
16//!
17//! # Feature flags
18//!
19//! The crate is feature-flag heavy so that downstream crates pull in only what they
20//! need. `rest-client` is on by default; `grpc`, `axum`, `sqlx`, `store`,
21//! `metric-view`, `python`, and `node` gate the corresponding integrations. See the
22//! crate README for the full table.
23
24pub use error::{Error, Result};
25pub use models::*;
26pub use reference::UCReference;
27
28pub mod error;
29#[cfg(feature = "metric-view")]
30pub mod metric_view;
31pub mod models;
32pub mod reference;
33#[cfg(feature = "store")]
34pub mod services;
35#[cfg(feature = "store")]
36pub mod store;