anterofit 0.0.8

Wrap REST APIs with Rust traits using macros
Documentation

anterofit Build Status On Crates.io

Anterofit is a collection of Rust macros coupled to a lightweight, self-contained HTTP framework that allows you to create strongly-typed Rust wrappers around REST APIs with ease.

Inspired by Square's Retrofit, as referenced in the name, Anterofit is even more strongly typed as everything that is feasible to check at compile-time, is. Runtime errors are, with few exceptions, reserved for error conditions that can only be discovered at runtime.

Usage

Get started with our User Guide

Or an in-depth look with our Documentation

###Setup

####rustc-serialize:

Cargo.toml:

[dependencies]
anterofit = "0.1"
rustc-serialize = "0.3"

Crate Root:

#[macro_use] extern crate anterofit;
extern crate rustc_serialize;

Serde and JSON serialization:

Cargo.toml:

[dependencies]
serde = "0.8"

[dependencies.anterofit]
version = "0.1"
default-features = false
features = ["serde", "serde_json"]

Then see Serde's Setting Up Codegen guide.

###Choosing a serialization framework

rustc-serialize and Serde both have their pros and cons. Neither is a clear winner over the other; it depends entirely on your needs.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.