Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project are documented here.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.1]

### Documentation

- The crate-level example is now a compile-tested doctest instead of `ignore`,
so it is verified against the public API on every build.

## [0.1.0]

Initial release of `beckon`.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "beckon"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
authors = ["Azeem Shaik <azeemshaik025@gmail.com>"]
description = "Generate type-safe, async HTTP clients from endpoint definitions — a Rust proc macro."
Expand Down
22 changes: 13 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
//! with one async method per endpoint, a matching trait for mocking, and a typed
//! error enum.
//!
//! ```ignore
//! ```
//! use beckon::beckon;
//! use serde::{Deserialize, Serialize};
//!
//! #[derive(Serialize, Deserialize)]
//! struct User {
//! id: u32,
//! name: String,
//! pub struct User {
//! pub id: u32,
//! pub name: String,
//! }
//!
//! #[derive(Serialize)]
//! struct UserPath {
//! id: u32,
//! pub struct UserPath {
//! pub id: u32,
//! }
//!
//! beckon!(
Expand All @@ -36,9 +36,13 @@
//! }
//! );
//!
//! // let client = UserApi::new(reqwest::Url::parse("https://api.example.com")?, Some(30));
//! // let users = client.get_users().await?;
//! // let user = client.get_users_by_id(&UserPath { id: 1 }).await?;
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let client = UserApi::new(reqwest::Url::parse("https://api.example.com")?, Some(30));
//! let _users = client.get_users().await?;
//! let _user = client.get_users_by_id(&UserPath { id: 1 }).await?;
//! # Ok(())
//! # }
//! # fn main() {}
//! ```

extern crate proc_macro;
Expand Down
Loading