Crate pincer_core

Crate pincer_core 

Source
Expand description

Core types and traits for pincer declarative HTTP client.

This crate provides the foundational types used by pincer:

Modules§

header
HTTP header types
prelude
Prelude module for convenient imports.

Structs§

DefaultErrorDecoder
Default error decoder that always returns None.
Form
A multipart form containing multiple parts.
ParamMeta
Metadata about a single parameter.
ParameterMetadata
All parameter metadata for a method call.
Part
A single part in a multipart form.
PathTemplate
The original path template before parameter substitution.
Request
An HTTP request with method, URL, headers, optional body, and extensions.
RequestBuilder
Builder for constructing Request instances.
Response
HTTP response with status, headers, and body.
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).

Enums§

ContentType
Content type for request bodies.
Error
Main error type for pincer operations.
Method
HTTP request method.
ParamLocation
Parameter location in the HTTP request.

Traits§

ErrorDecoder
Trait for decoding HTTP error responses into typed errors.
HttpClient
Core HTTP client trait.
HttpClientExt
Extension trait for HttpClient with convenience methods.
PincerClient
Trait for types that can be used as pincer API clients.
ToQueryPairs
Trait for types that can be converted to query parameter pairs.

Functions§

from_json
Deserialize JSON bytes to a value with path-aware error messages.
to_form
Serialize a value to form URL-encoded bytes.
to_json
Serialize a value to JSON bytes.
to_query_string
Serialize a value to a query string.

Type Aliases§

Result
Result type alias using crate::Error.