@arrirpc/codegen-rust 0.76.3 → 0.76.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/package.json +2 -2
package/README.md
CHANGED
@@ -6,13 +6,13 @@
|
|
6
6
|
|
7
7
|
```ts
|
8
8
|
// arri.config.ts
|
9
|
-
import { defineConfig, generators } from
|
9
|
+
import { defineConfig, generators } from 'arri';
|
10
10
|
|
11
11
|
export default defineConfig({
|
12
12
|
generators: [
|
13
13
|
generators.rustClient({
|
14
|
-
clientName:
|
15
|
-
outputFile:
|
14
|
+
clientName: 'MyClient',
|
15
|
+
outputFile: './some-project/my_client.g.rs',
|
16
16
|
}),
|
17
17
|
],
|
18
18
|
});
|
@@ -136,19 +136,19 @@ client
|
|
136
136
|
|
137
137
|
All the generated types will have the following methods implemented
|
138
138
|
|
139
|
-
-
|
140
|
-
-
|
141
|
-
-
|
142
|
-
-
|
143
|
-
-
|
139
|
+
- `from_json_string(String input) -> Self`
|
140
|
+
- `from_json(serde_json::Value input) -> Self`
|
141
|
+
- `to_json(&Self) -> serde_json::Value`
|
142
|
+
- `to_json_string(&Self) -> String`
|
143
|
+
- `to_query_params_string(&Self) -> String`
|
144
144
|
|
145
145
|
`serde_json` is used for parsing JSON. However we do not rely on `serde` itself for serializing and deserializing.
|
146
146
|
|
147
147
|
The generated types also derive the following traits
|
148
148
|
|
149
|
-
-
|
150
|
-
-
|
151
|
-
-
|
149
|
+
- Clone
|
150
|
+
- Debug
|
151
|
+
- PartialEq
|
152
152
|
|
153
153
|
# Development
|
154
154
|
|