pyo3_introspection/
model.rs
1#[derive(Debug, Eq, PartialEq, Clone, Hash)]
2pub struct Module {
3 pub name: String,
4 pub modules: Vec<Module>,
5 pub classes: Vec<Class>,
6 pub functions: Vec<Function>,
7}
8
9#[derive(Debug, Eq, PartialEq, Clone, Hash)]
10pub struct Class {
11 pub name: String,
12 pub methods: Vec<Function>,
13}
14
15#[derive(Debug, Eq, PartialEq, Clone, Hash)]
16pub struct Function {
17 pub name: String,
18 pub decorators: Vec<String>,
20 pub arguments: Arguments,
21}
22
23#[derive(Debug, Eq, PartialEq, Clone, Hash)]
24pub struct Arguments {
25 pub positional_only_arguments: Vec<Argument>,
27 pub arguments: Vec<Argument>,
29 pub vararg: Option<VariableLengthArgument>,
31 pub keyword_only_arguments: Vec<Argument>,
33 pub kwarg: Option<VariableLengthArgument>,
35}
36
37#[derive(Debug, Eq, PartialEq, Clone, Hash)]
38pub struct Argument {
39 pub name: String,
40 pub default_value: Option<String>,
42}
43
44#[derive(Debug, Eq, PartialEq, Clone, Hash)]
46pub struct VariableLengthArgument {
47 pub name: String,
48}