| Crates.io | deboa-macros |
| lib.rs | deboa-macros |
| version | 0.0.1-beta.2 |
| created_at | 2025-09-12 02:17:31.315657+00 |
| updated_at | 2025-09-24 10:44:17.246241+00 |
| description | macros for deboa |
| homepage | |
| repository | https://github.com/ararog/deboa |
| max_upload_size | |
| id | 1834914 |
| size | 100,440 |
cargo add deboa-macros
use deboa::errors::DeboaError;
use deboa_macros::bora;
use vamo::Vamo;
#[derive(Deserialize, Debug)]
pub struct Post {
pub id: u32,
pub title: String,
}
#[bora(
api(
get(name="get_by_id", path="/posts/<id:i32>", res_body=Post, format="json")
)
)]
pub struct PostService;
let client = Vamo::new("https://jsonplaceholder.typicode.com");
let mut post_service = PostService::new(client);
let post = post_service.get_by_id(1).await?;
println!("id...: {}", post.id);
println!("title: {}", post.title);
Ok(())
It is not possible to use the same name for different operations. Please keep struct names unique and in separate modules if possible.
MIT
Rogerio Pereira Araujo rogerio.araujo@gmail.com