Skip to main content

Crate typeway_client

Crate typeway_client 

Source
Expand description

typeway-client — type-safe HTTP client derived from Typeway API types.

The client calls endpoints using the same types as the server. If the server’s API type changes, the client fails to compile until updated.

Re-exports§

pub use call::CallEndpoint;
pub use client::Client;
pub use config::ClientConfig;
pub use error::ClientError;
pub use interceptor::RequestInterceptor;
pub use interceptor::ResponseInterceptor;
pub use request_builder::RequestBuilder;
pub use retry::RetryPolicy;
pub use tracing_interceptor::with_tracing;
pub use typed_response::TypedResponse;

Modules§

call
The CallEndpoint trait — type-safe endpoint invocation.
client
The type-safe Client for calling API endpoints.
config
Client configuration with timeout, retry, interceptor, and header settings.
error
Client error types.
interceptor
Request and response interceptors for the Client.
methods
The client_api! macro for generating named client wrapper structs.
request_builder
Per-call RequestBuilder for overriding headers, query params, and timeouts.
retry
Retry policy with exponential backoff and jitter.
streaming
Streaming response support for the crate::Client.
tracing_interceptor
Built-in tracing support for the Client.
typed_response
The TypedResponse wrapper — a deserialized body paired with HTTP metadata.

Macros§

client_api
Generate a named client wrapper struct with a method per endpoint.