aws_sdk_gamesparks/
lib.rs

1#![allow(deprecated)]
2#![allow(clippy::module_inception)]
3#![allow(clippy::upper_case_acronyms)]
4#![allow(clippy::large_enum_variant)]
5#![allow(clippy::wrong_self_convention)]
6#![allow(clippy::should_implement_trait)]
7#![allow(clippy::disallowed_names)]
8#![allow(clippy::vec_init_then_push)]
9#![allow(clippy::type_complexity)]
10#![allow(clippy::needless_return)]
11#![allow(clippy::derive_partial_eq_without_eq)]
12#![allow(clippy::result_large_err)]
13#![allow(rustdoc::bare_urls)]
14#![warn(missing_docs)]
15//! **Please Note: The SDK is currently in Developer Preview and is intended strictly for
16//! feedback purposes only. Do not use this SDK for production workloads.**
17//!
18//! ## Getting Started
19//!
20//! > Examples are available for many services and operations, check out the
21//! > [examples folder in GitHub](https://github.com/awslabs/aws-sdk-rust/tree/main/examples).
22//!
23//! The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio)
24//! as a dependency within your Rust project to execute asynchronous code. To add `aws-sdk-gamesparks` to
25//! your project, add the following to your **Cargo.toml** file:
26//!
27//! ```toml
28//! [dependencies]
29//! aws-config = "0.56.1"
30//! aws-sdk-gamesparks = "0.33.0"
31//! tokio = { version = "1", features = ["full"] }
32//! ```
33//!
34//! Then in code, a client can be created with the following:
35//!
36//! ```rust,no_run
37//! use aws_sdk_gamesparks as gamesparks;
38//!
39//! #[::tokio::main]
40//! async fn main() -> Result<(), gamesparks::Error> {
41//!     let config = aws_config::load_from_env().await;
42//!     let client = aws_sdk_gamesparks::Client::new(&config);
43//!
44//!     // ... make some calls with the client
45//!
46//!     Ok(())
47//! }
48//! ```
49//!
50//! See the [client documentation](https://docs.rs/aws-sdk-gamesparks/latest/aws_sdk_gamesparks/client/struct.Client.html)
51//! for information on what calls can be made, and the inputs and outputs for each of those calls.
52//!
53//! ## Using the SDK
54//!
55//! Until the SDK is released, we will be adding information about using the SDK to the
56//! [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html). Feel free to suggest
57//! additional sections for the guide by opening an issue and describing what you are trying to do.
58//!
59//! ## Getting Help
60//!
61//! * [GitHub discussions](https://github.com/awslabs/aws-sdk-rust/discussions) - For ideas, RFCs & general questions
62//! * [GitHub issues](https://github.com/awslabs/aws-sdk-rust/issues/new/choose) - For bug reports & feature requests
63//! * [Generated Docs (latest version)](https://awslabs.github.io/aws-sdk-rust/)
64//! * [Usage examples](https://github.com/awslabs/aws-sdk-rust/tree/main/examples)
65//!
66//!
67//! # Crate Organization
68//!
69//! The entry point for most customers will be [`Client`], which exposes one method for each API
70//! offered by GameSparks. The return value of each of these methods is a "fluent builder",
71//! where the different inputs for that API are added by builder-style function call chaining,
72//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in
73//! either a successful output or a [`SdkError`](crate::error::SdkError).
74//!
75//! Some of these API inputs may be structs or enums to provide more complex structured information.
76//! These structs and enums live in [`types`](crate::types). There are some simpler types for
77//! representing data such as date times or binary blobs that live in [`primitives`](crate::primitives).
78//!
79//! All types required to configure a client via the [`Config`](crate::Config) struct live
80//! in [`config`](crate::config).
81//!
82//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
83//! is the input, output, and error type for that API, as well as builders to construct each of those.
84//!
85//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
86//! client can return. Any other error type can be converted to this `Error` type via the
87//! [`From`](std::convert::From) trait.
88//!
89//! The other modules within this crate are not required for normal usage.
90
91// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
92pub use error_meta::Error;
93
94#[doc(inline)]
95pub use config::Config;
96
97/// Client for calling GameSparks.
98/// ## Constructing a `Client`
99///
100/// A [`Config`] is required to construct a client. For most use cases, the [`aws-config`]
101/// crate should be used to automatically resolve this config using
102/// [`aws_config::load_from_env()`], since this will resolve an [`SdkConfig`] which can be shared
103/// across multiple different AWS SDK clients. This config resolution process can be customized
104/// by calling [`aws_config::from_env()`] instead, which returns a [`ConfigLoader`] that uses
105/// the [builder pattern] to customize the default config.
106///
107/// In the simplest case, creating a client looks as follows:
108/// ```rust,no_run
109/// # async fn wrapper() {
110/// let config = aws_config::load_from_env().await;
111/// let client = aws_sdk_gamesparks::Client::new(&config);
112/// # }
113/// ```
114///
115/// Occasionally, SDKs may have additional service-specific that can be set on the [`Config`] that
116/// is absent from [`SdkConfig`], or slightly different settings for a specific client may be desired.
117/// The [`Config`] struct implements `From<&SdkConfig>`, so setting these specific settings can be
118/// done as follows:
119///
120/// ```rust,no_run
121/// # async fn wrapper() {
122/// let sdk_config = ::aws_config::load_from_env().await;
123/// let config = aws_sdk_gamesparks::config::Builder::from(&sdk_config)
124/// # /*
125///     .some_service_specific_setting("value")
126/// # */
127///     .build();
128/// # }
129/// ```
130///
131/// See the [`aws-config` docs] and [`Config`] for more information on customizing configuration.
132///
133/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should
134/// be done once at application start-up.
135///
136/// [`Config`]: crate::Config
137/// [`ConfigLoader`]: https://docs.rs/aws-config/*/aws_config/struct.ConfigLoader.html
138/// [`SdkConfig`]: https://docs.rs/aws-config/*/aws_config/struct.SdkConfig.html
139/// [`aws-config` docs]: https://docs.rs/aws-config/*
140/// [`aws-config`]: https://crates.io/crates/aws-config
141/// [`aws_config::from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.from_env.html
142/// [`aws_config::load_from_env()`]: https://docs.rs/aws-config/*/aws_config/fn.load_from_env.html
143/// [builder pattern]: https://rust-lang.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
144/// # Using the `Client`
145///
146/// A client has a function for every operation that can be performed by the service.
147/// For example, the [`CreateGame`](crate::operation::create_game) operation has
148/// a [`Client::create_game`], function which returns a builder for that operation.
149/// The fluent builder ultimately has a `send()` function that returns an async future that
150/// returns a result, as illustrated below:
151///
152/// ```rust,ignore
153/// let result = client.create_game()
154///     .game_name("example")
155///     .send()
156///     .await;
157/// ```
158///
159/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
160/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
161/// information.
162pub mod client;
163
164/// Configuration for GameSparks.
165pub mod config;
166
167/// Common errors and error handling utilities.
168pub mod error;
169
170mod error_meta;
171
172/// Information about this crate.
173pub mod meta;
174
175/// All operations that this crate can perform.
176pub mod operation;
177
178/// Primitives such as `Blob` or `DateTime` used by other types.
179pub mod primitives;
180
181/// Data structures used by operation inputs/outputs.
182pub mod types;
183
184pub(crate) mod protocol_serde;
185
186mod serialization_settings;
187
188mod lens;
189
190mod endpoint_lib;
191
192mod json_errors;
193
194#[doc(inline)]
195pub use client::Client;