google_cloud_storage/
lib.rs

1// Copyright 2025 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 Cloud Client Libraries for Rust - Storage
16//!
17//! This crate contains traits, types, and functions to interact with [Google
18//! Cloud Storage]. Most applications will use the structs defined in the
19//! [client] module. More specifically:
20//!
21//! * [Storage][client::Storage]
22//! * [StorageControl][client::StorageControl]
23//!
24//! **NOTE:** This crate used to contain a different implementation, with a
25//! different surface. [@yoshidan](https://github.com/yoshidan) generously
26//! donated the crate name to Google. Their crate continues to live as
27//! [gcloud-storage].
28//!
29//! [gcloud-storage]: https://crates.io/crates/gcloud-storage
30//! [Google Cloud Storage]: https://cloud.google.com/storage
31
32pub use gax::Result;
33pub use gax::error::Error;
34
35pub mod backoff_policy;
36pub mod read_object;
37pub mod read_resume_policy;
38pub mod retry_policy;
39pub use crate::storage::request_options;
40pub use crate::storage::streaming_source;
41
42mod control;
43mod storage;
44
45pub mod client {
46    //! Clients to interact with Google Cloud Storage.
47    pub use crate::control::client::StorageControl;
48    pub use crate::storage::client::Storage;
49}
50pub mod builder {
51    //! Request builders.
52    pub mod storage {
53        //! Request builders for [Storage][crate::client::Storage].
54        pub use crate::storage::client::ClientBuilder;
55        pub use crate::storage::read_object::ReadObject;
56        pub use crate::storage::write_object::WriteObject;
57    }
58    pub mod storage_control {
59        //! Request builders for [StorageControl][crate::client::StorageControl].
60        pub use crate::control::builder::*;
61        pub use crate::control::client::ClientBuilder;
62    }
63}
64pub mod error;
65/// The messages and enums that are part of this client library.
66pub use crate::control::model;
67pub mod builder_ext;
68pub mod model_ext;
69pub mod stub {
70    pub use crate::control::stub::*;
71    pub use crate::storage::stub::*;
72}
73
74#[allow(dead_code)]
75pub(crate) mod generated;
76
77#[allow(dead_code)]
78pub(crate) mod google {
79    pub mod iam {
80        pub mod v1 {
81            include!("generated/protos/storage/google.iam.v1.rs");
82            include!("generated/convert/iam/convert.rs");
83        }
84    }
85    pub mod longrunning {
86        include!("generated/protos/control/google.longrunning.rs");
87        include!("generated/convert/longrunning/convert.rs");
88    }
89    pub mod r#type {
90        include!("generated/protos/storage/google.r#type.rs");
91        include!("generated/convert/type/convert.rs");
92    }
93    pub mod rpc {
94        include!("generated/protos/storage/google.rpc.rs");
95    }
96    pub mod storage {
97        #[allow(deprecated)]
98        #[allow(clippy::large_enum_variant)]
99        pub mod v2 {
100            include!("generated/protos/storage/google.storage.v2.rs");
101            include!("generated/convert/storage/convert.rs");
102        }
103        pub mod control {
104            pub mod v2 {
105                include!("generated/protos/control/google.storage.control.v2.rs");
106                include!("generated/convert/control/convert.rs");
107            }
108        }
109    }
110}