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 helpers.
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#[cfg(feature = "unstable-sdk-client")]
39#[doc(hidden)]
40pub mod query_parameter;
41
42#[cfg(feature = "unstable-sdk-client")]
43#[doc(hidden)]
44pub mod path_parameter;
45
46/// Implements helpers to create telemetry headers.
47#[cfg(feature = "unstable-sdk-client")]
48#[doc(hidden)]
49pub mod api_header;
50
51/// The core error types used by generated clients.
52pub mod error;
53
54/// Defines some types and traits to convert and use List RPCs as a Stream.
55/// Async streams are not yet stable, so neither is the use of this feature.
56#[cfg(feature = "unstable-stream")]
57pub mod paginator;
58
59/// Defines traits and helpers for HTTP client implementations.
60#[cfg(feature = "unstable-sdk-client")]
61#[doc(hidden)]
62pub mod http_client;
63
64pub mod backoff_policy;
65pub mod exponential_backoff;
66pub mod loop_state;
67pub mod options;
68pub mod polling_backoff_policy;
69pub mod polling_policy;
70pub mod retry_policy;
71pub mod retry_throttler;