Skip to main content

lance_namespace/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright The Lance Authors
3
4//! Lance Namespace Rust Client
5//!
6//! A Rust client for the Lance Namespace API that provides a unified interface
7//! for managing namespaces and tables across different backend implementations.
8//!
9//! # Error Handling
10//!
11//! This crate provides fine-grained error types through the [`error`] module.
12//! Each error type has a unique numeric code that is consistent across all
13//! Lance Namespace implementations (Python, Java, Rust, REST).
14//!
15//! See [`error::ErrorCode`] for the list of error codes and
16//! [`error::NamespaceError`] for the error types.
17
18pub mod compat;
19pub mod error;
20pub mod namespace;
21pub mod schema;
22
23// Re-export the trait at the crate root
24pub use lance_core::{Error, Result};
25pub use namespace::LanceNamespace;
26
27// Re-export error types
28pub use error::{ErrorCode, NamespaceError, Result as NamespaceResult};
29
30// Re-export reqwest client for convenience
31pub use lance_namespace_reqwest_client as reqwest_client;
32
33// Re-export commonly used models from the reqwest client
34pub mod models {
35    pub use lance_namespace_reqwest_client::models::*;
36}
37
38// Re-export APIs from the reqwest client
39pub mod apis {
40    pub use lance_namespace_reqwest_client::apis::*;
41}