google-cloud-storage 1.11.0

Google Cloud Client Libraries for Rust - Storage
Documentation
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

pub(crate) mod bidi;
pub(crate) mod checksum;
pub(crate) mod client;
pub(crate) mod common_options;
pub(crate) mod open_object;
pub(crate) mod perform_upload;
pub(crate) mod read_object;
pub mod request_options;
pub(crate) mod signed_url;
pub mod streaming_source;
pub mod stub;
pub(crate) mod tracing;
pub(crate) mod transport;
pub(crate) mod v1;
pub(crate) mod write_object;

use crate::model::Object;
use crate::streaming_source::Payload;
use crate::{Error, Result};

/// The default host used by the service.
const DEFAULT_HOST: &str = "https://storage.googleapis.com";

pub(crate) mod info {
    use std::sync::LazyLock;

    const NAME: &str = env!("CARGO_PKG_NAME");
    const VERSION: &str = env!("CARGO_PKG_VERSION");
    pub(crate) static X_GOOG_API_CLIENT_HEADER: LazyLock<String> = LazyLock::new(|| {
        let ac = gaxi::api_header::XGoogApiClient {
            name: NAME,
            version: VERSION,
            library_type: gaxi::api_header::GCCL,
        };
        ac.grpc_header_value()
    });

    pub(crate) static INSTRUMENTATION: LazyLock<gaxi::options::InstrumentationClientInfo> =
        LazyLock::new(|| {
            let mut info = gaxi::options::InstrumentationClientInfo::default();
            info.service_name = "storage";
            info.client_version = VERSION;
            info.client_artifact = NAME;
            info.default_host = "storage.googleapis.com";
            info
        });
}