Skip to main content

Crate infrawrench_sdk

Crate infrawrench_sdk 

Source
Expand description

Generated Rust client for the Infrawrench API.

API version: 1.121.0 Default base URL: https://app.infrawrench.com Operations: 943

use infrawrench_sdk::{APIV1Client, AccountsListParams, ClientConfig, Error};

let client = APIV1Client::new(ClientConfig::new().api_key("iw_…").org_id("org"))?;

match client.accounts().list(AccountsListParams::new()).await {
    Ok(accounts) => println!("{} accounts", accounts.len()),
    Err(error) => eprintln!("{:?} {error}", error.status()),
}

Re-exports§

pub use client::*;
pub use models::*;
pub use params::*;

Modules§

client
The dotted call tree.
models
Every type the API sends or receives.
params
One struct per operation, holding its path parameters, query parameters and request body.

Structs§

ApiError
A non-2xx response, with everything needed to branch on it.
ClientConfig
How to reach the API. Every field has a working default except the API key.
FileUpload
File bytes bound for a multipart/form-data field.
RequestSpec
A single HTTP call, as assembled by the generated namespace methods.
Transport
Request plumbing shared by every namespace.

Enums§

Accept
What the endpoint returns, which decides both the Accept header and how the response body is read back.
Error
Everything a call can fail with.
FormValue
One field of a multipart/form-data body.

Traits§

IntoMultipart
A model that knows how to become a multipart body. Implemented by the generator for exactly those schemas the spec sends as multipart/form-data.

Functions§

form_text
Render a value as a multipart/form-data text field. Used only by the generated IntoMultipart impls.