MCPcopy Create free account
hub / github.com/Wulf/tsync / process_rust_item

Function process_rust_item

src/lib.rs:82–106  ·  view source on GitHub ↗
(item: syn::Item, state: &mut BuildState, config: &BuildSettings)

Source from the content-addressed store, hash-verified

80}
81
82fn process_rust_item(item: syn::Item, state: &mut BuildState, config: &BuildSettings) {
83 match item {
84 syn::Item::Const(exported_const) => {
85 check_tsync!(exported_const, in: "const", {
86 exported_const.convert_to_ts(state, config);
87 });
88 }
89 syn::Item::Struct(exported_struct) => {
90 check_tsync!(exported_struct, in: "struct", {
91 exported_struct.convert_to_ts(state, config);
92 });
93 }
94 syn::Item::Enum(exported_enum) => {
95 check_tsync!(exported_enum, in: "enum", {
96 exported_enum.convert_to_ts(state, config);
97 });
98 }
99 syn::Item::Type(exported_type) => {
100 check_tsync!(exported_type, in: "type", {
101 exported_type.convert_to_ts(state, config);
102 });
103 }
104 _ => {}
105 }
106}
107
108fn process_rust_file<P: AsRef<Path>>(
109 input_path: P,

Callers 1

process_rust_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected