Expand description
§RRW-Macro (Rust REST Wrapper)
A crate bringing a easy-to-use macro for usage with the crate rrw to build REST-clients.
§Example
#[rest]
impl Bahn {
async fn location(
&self, location: &LocationQuery
) -> Result<Vec<Location>, Error<StandardRestError>> {
RestRequest::<&LocationQuery, ()>::get("/locations").query(location)
}
}Further examples can be found in the rrw crate.
Attribute Macros§
- rest
- A macro to simply programm a REST-wrapper.