Skip to main content

Module endpoint

Module endpoint 

Source
Expand description

Typed API routes via the Endpoint trait.

Define routes as types, then use Client::call for a typed EndpointRequestBuilder. Path and query use .params() and .query() with structs — not string keys.

For ad-hoc string paths, use Client::get instead (see RequestBuilder).

Helpers: [endpoint!], [define_params!], and (feature macros) EndpointParamsDerive / EndpointQueryDerive.

Structs§

EndpointRequestBuilder
Fluent builder for a typed Endpoint.
NeedsParams
Type-state: path parameters still required before send.
Ready
Type-state: ready to configure query/headers and send.

Traits§

Endpoint
Describes a typed API route.
EndpointParams
Applies path parameters to a RequestBuilder.
EndpointParamsInitial
Creates the initial EndpointRequestBuilder for client.call::<E>().
EndpointQuery
Applies query parameters to a RequestBuilder.

Functions§

apply_serialized_query
Applies a serde-serializable query struct to a request builder (feature json).

Type Aliases§

ParamsBuilderState
Initial builder state for an endpoint’s path parameters.