| Crates.io | pincer-macro |
| lib.rs | pincer-macro |
| version | 0.1.1 |
| created_at | 2025-12-31 13:36:27.060025+00 |
| updated_at | 2025-12-31 18:03:37.931557+00 |
| description | Procedural macros for pincer declarative HTTP client |
| homepage | |
| repository | https://github.com/ilaborie/pincer |
| max_upload_size | |
| id | 2014703 |
| size | 121,380 |
Proc-macros for the pincer HTTP client.
This crate provides the proc-macro attributes:
#[pincer] - Define an API client trait#[get], #[post], #[put], #[delete], #[patch], #[head], #[options] - HTTP methods#[http] - Custom HTTP methods#[derive(Query)] - Query parameter serializationMost users should use the main pincer crate, which re-exports these macros.
use pincer::prelude::*;
#[pincer(url = "https://api.example.com")]
pub trait MyApi {
#[get("/users/{id}")]
async fn get_user(&self, #[path] id: u64) -> pincer::Result<User>;
}
MIT OR Apache-2.0