hcloud for Rust

Crates.io Documentation Build and test

Unofficial Rust crate for accessing the Hetzner Cloud API

Overview

The hcloud crate can be used for managing the endpoints provided by the Hetzner Cloud API in your Rust project.

The API client code of this crate has been auto-generated from the Unofficial OpenAPI Description for the Hetzner Cloud API using OpenAPI Generator.

Current state of development

Example

A very basic example for listing all existing servers:

```rust use hcloud::apis::client::APIClient; use hcloud::apis::configuration::Configuration;

// set up basic configuration using API token let mut configuration = Configuration::new(); configuration.beareraccesstoken = Some("YOURHCLOUDAPITOKEN".tostring());

// create API client handle from configuration let api_client = APIClient::new(configuration);

// get list of all existing servers from servers API let servers = apiclient .serversapi() .list_servers(None, None, None, None)? .servers;

// handle server data for server in servers { println!("{:?}", server); } ```

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.