py-rs 0.1.1

generate python bindings from rust types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use py_rs::PY;

#[derive(PY)]
#[py(export_to = "issue_317/")]
struct VariantId(u32);

#[derive(PY)]
#[py(export_to = "issue_317/")]
struct VariantOverview {
    id: u32,
    name: String,
}

#[derive(PY)]
#[py(export, export_to = "issue_317/")]
struct Container {
    variants: Vec<(VariantId, VariantOverview)>,
}