Crate ip_allocator_client

Crate ip_allocator_client 

Source
Expand description

IP Allocator API Client

This crate provides a Rust client for the IP Allocator API. The client is auto-generated from the OpenAPI specification.

§Example

use ip_allocator_client::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new("http://localhost:8000");

    // Borrow an item (immediate return)
    let result = client.handlers_ip_borrow(None).await?;
    println!("Borrowed item: {:?}", result);

    // Or wait up to 30 seconds for an item to become available
    // let result = client.handlers_ip_borrow(Some(30)).await?;

    Ok(())
}

Modules§

prelude
Items consumers will typically use such as the Client.
types
Types used as operation parameters and responses.

Structs§

ByteStream
Untyped byte stream used for both success and error responses.
Client
Client for ip-allocator-webserver
ResponseValue
Typed value returned by generated client methods.

Enums§

Error
Error produced by generated client methods.