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//! This crate contains a number of types and functions used in the
18//! implementation of the Google Cloud Client Libraries for Rust.
19//!
20//! <div class="warning">
21//! All the types, traits, and functions defined in any module with `internal`
22//! in its name are <b>not</b> intended for general use. Such symbols will
23//! remain unstable for the foreseeable future, even if used in stable SDKs.
24//! We (the Google Cloud Client Libraries for Rust team) control both and will
25//! change both if needed.
26//! </div>
27
28#![cfg_attr(docsrs, feature(doc_cfg))]
29
30/// An alias of [std::result::Result] where the error is always [Error][crate::error::Error].
31///
32/// This is the result type used by all functions wrapping RPCs.
33pub type Result<T> = std::result::Result<T, crate::error::Error>;
34
35/// The core error types used by generated clients.
36pub mod error;
37
38pub mod paginator;
39
40pub mod response;
41
42pub mod backoff_policy;
43pub mod client_builder;
44pub mod exponential_backoff;
45pub mod options;
46pub mod polling_backoff_policy;
47pub mod polling_error_policy;
48pub mod polling_state;
49pub mod retry_policy;
50pub mod retry_result;
51pub mod retry_state;
52pub mod retry_throttler;
53pub mod throttle_result;
54
55#[cfg_attr(not(feature = "_internal-semver"), doc(hidden))]
56pub mod retry_loop_internal;
57
58#[cfg(test)]
59pub(crate) mod mock_rng;