google_cloud_gax/lib.rs
1// Copyright 2024 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Google APIs eXtensions for Rust.
16//!
17//! **WARNING:** this crate is under active development. We expect multiple
18//! breaking changes in the upcoming releases. Testing is also incomplete, we do
19//! **not** recommend that you use this crate in production. We welcome feedback
20//! about the APIs, documentation, missing features, bugs, etc.
21//!
22//! This crate contains a number of types and functions used in the
23//! implementation of the Google Cloud Client Libraries for Rust.
24//!
25//! <div class="warning">
26//! All the types, traits, and functions defined in the <code>unstable-sdk-client</code>
27//! feature are <b>not</b> intended for general use. The APIs enabled by this
28//! feature will remain unstable for the foreseeable future, even if used in
29//! stable SDKs. We (the Google Cloud Client Libraries for Rust team) control both and will
30//! change both if needed.
31//! </div>
32
33/// An alias of [std::result::Result] where the error is always [Error][crate::error::Error].
34///
35/// This is the result type used by all functions wrapping RPCs.
36pub type Result<T> = std::result::Result<T, crate::error::Error>;
37
38/// The core error types used by generated clients.
39pub mod error;
40
41/// Defines some types and traits to convert and use List RPCs as a Stream.
42pub mod paginator;
43
44pub mod response;
45
46pub mod backoff_policy;
47pub mod client_builder;
48pub mod exponential_backoff;
49pub mod loop_state;
50pub mod options;
51pub mod polling_backoff_policy;
52pub mod polling_error_policy;
53pub mod retry_policy;
54pub mod retry_throttler;
55
56#[cfg(feature = "unstable-sdk-client")]
57#[doc(hidden)]
58pub mod retry_loop_internal;